I am reading in 14 byte messages from a device and I store them in an array of bitsets...
bitset<8> currentMessage[14];
I want to create a queue of these messages. (Ideally I want the last 10 messages but I think that might be a whole other question? limit size of Queue<T> in C++.)
How can I create this queue?
I tried...
std::queue<bitset> buttonQueue;
but I received the following errors:
(N.B. I noticed Boost's Circular Buffer, could this be a more suited alternative for what I'm trying to do?)
I'm pretty new to c++, can anyone help me out?
The template argument need to be a full and complete type. And a templated class like std::bitset
is not a complete type without its size. So you need to do e.g.
std::queue<bitset<8>> buttonQueue;
In other words, you need to provide the bitset size as well.