How to add an item to the buffer? I tried:
std::string str = "qwerty"; std::string str2 = "test"; //std::cout << str[0]; FIFOBuffer buf(str.c_str(),6); buf.write(str2.c_str(), 4); How to add an item to the buffer? I tried:
std::string str = "qwerty"; std::string str2 = "test"; //std::cout << str[0]; FIFOBuffer buf(str.c_str(),6); buf.write(str2.c_str(), 4); Judging by the documentation, it works
BasicFIFOBuffer( const T * pBuffer, std::size_t size, bool notify = false ); those. a buffer of 6 characters is created and already filled. To add there something else without extension is extremely problematic ...
Check what the isFull() call returns. You can write if isWritable() returns true .
Increase buffer size - resize .
That's all - just a quick glance at the documentation ... So theoretically you might have some other errors, but for now, look at these.
FIFOBuffer is a typedef for BasicFIFOBuffer<char> , so with creation everything is fine. - 伪位蔚蠂慰位蠀蟿Source: https://ru.stackoverflow.com/questions/590367/
All Articles