get() is reading double digit as individual digits
For example: 1, 5, 12, 8
1 2
|
val1 = f1.get();
f1Vector.push_back(atoi(val1.c_str()));
|
It's reading the single digits just fine, but for some reason, the 12 gets split into 1 and 2
Anyone know why that might be?
The get() function reads one character.
If you want to read numbers you should consider using the >> operator.
Topic archived. No new replies allowed.