What you could do, using C++ style methods, is storing the whole thing in a string using getline (http://www.cplusplus.com/forum/articles/6046/), then use find() and substr() to seperate them into the different parts ("07" and "00") and after that you can use stringstream to 'translate' them into integers (see that article about getline(), 'how to get a number').