12,GVAA123,Nissan Leaf,0<ENTER>
(int),(7 Character Max + Nullbyte),(60 Character limit),(boolean)
For some reason the last value, m_carwash is being set to a char value of some character, which when using debugger to see whats happening, its the fill character after the stream buffer.
is my way of extracting temp from the buffer being done incorrectly? it is to my knowledge it wont discard the delimiter, and that's why I have the ignore() right after.
(UPDATE)
It works if i replace the get() with
istr >> m_carwash;
But I would still like to know why my first strategy isn't working.
Is there a particular reason that you're using C-strings instead of C++ strings?
Since you want to discard the delimiter, it may be easier to use getline() instead of get().
What type of variable is carwash?
For some reason the last value, m_carwash is being set to a char value of some character,
That's because istream.get() works with C-strings or single characters, not numbers. If you want numbers you will need to use the extraction operator. Remember the number 0 is not the same as the digit 0. Look at an ASCII chart to see the difference.