I am using the following to convert serial data over a com port into a deque. The problem I am having is that while data is streaming and things get busy the program tends to crash on this. It works fine for awhile, sometimes hours, it is a multithreaded program, so this may not be the only issue, I was just wondering if anyone has some suggestions...
for(i=0 ; i< bytes_read ; i++) //Convert from BYTE array to Byte deque STL
packetStream.push_back(read);
This method would make life easier for me when processing the streaming data so I don't need to keep track of the pointers myself. I am also unable to read directly into the deque because the ReadFile call goes into it's own buffer (read[])...