I'm quite new to C++ still, so please help me
:
Im using fstream to read a file with three numbers "1" "23" and "34", between each number there's a space. I use two int variable to read those integers, but somehow it reads more than three numbers. And the white space doesn't do anything to the reading of the file, so i suspect that the problem is at the end of the file, but i can't figure why there's a problem since i have nothing there. Please help me
!
ps. fot those particular numbers, my program reads: 1 23 34 and 23, i dont know where that 23 came from, is there anyway to get rid of 23? thx for any suggestions
Im using fstream to read a file with three numbers "1" "23" and "34", between each number there's a space. I use two int variable to read those integers, but somehow it reads more than three numbers. And the white space doesn't do anything to the reading of the file, so i suspect that the problem is at the end of the file, but i can't figure why there's a problem since i have nothing there. Please help me
ps. fot those particular numbers, my program reads: 1 23 34 and 23, i dont know where that 23 came from, is there anyway to get rid of 23? thx for any suggestions