Sorry I could not debug my stuff, cause I have just changed to codeblocks from VS and is not familiar with windbg debugger yet (which looks crappy at first glance). So the problem is that the following piece of code does not work. I mean it compiles but does not result in what I expect from it. It seems tmp variable gets rubbish. What do I do wrong? Thanks.
Indeed that is more elegant, I did not know I could use fp >> tmp as a condition. Thank you.
The problem was in reusing the stream for another file and forgetting to clear it to set the iterator to the begining of the stream. I am would delete the thread a bit later if that is possible.
I had the same problem with codeblocks and switched right back to visual studio express. I hate the debugger and there is no way to reconfigure the hotkeys to be more visual studio like. However, I was able to figure out the new buttons fairly quickly. I think that it is fairly intuitive to figure out but it is quite a bit different from visual studio. You should take another shot at it and practice with the debugger if you plan on continuing to use code blocks.