I have been struggling with this for a while. I would like to put back the last character read by file.get() ( an fstream object ) because the next lines in the file are not organized by ('s nor are they integers...
Is there a simple way of doing this? file.put() and file.putback() both seem to be mucking the next several lines of the file input up...
Any help would be greatly appreciated here ( the rest of the function which is getting the integers from the file and discarding the ('s is working fine).
The reason I want to put it back is that the next function is already working perfectly uses file.getline() to process each line as a character string ( which the transTable machine processes ).
Are you allowed to use the STL - I think I asked last time?
Then you can use getline and parse the string from there, (with the STL string member functions and or algorithms), not to worry about consuming or putting back chars.
Using peek allowed me to see the character without getting it.
I took your suggestion and learned the netbeans debugger which ended up not taking more than a half an hour or so ( well at least the functionality I use, i.e. viewing variable changes and setting break points, etc. ).
I was using eclipse with same c++ plug in and when my program crashed it hung the entire Windows8 operating system.. At least netBeans lets me kill the process and continue...