I'm attempting to read two bignums and an operator from a file into integer vectors (in order to do math on them) and I'm not allowed to use C++ strings. The file is in the format:
2308957235....
add
234989234786....
I'm not very familiar with the C++ file handling, so while I can read the numbers into the vector, I can't get it to recognize the end of a line in order to start the next one. After opening the file I have:
vector<int> numbers;
char inputDigit;
while(in>>inputDigit)
numbers.push_back(inputDigit-48);
which just throws everything in the file into the vector, ignoring the spaces or linebreaks. I've been banging my head against this for a few hours, so any help would be greatly appreciated.