Search:
Forum
Beginners
get() is reading double digit as individ
get() is reading double digit as individual digits
Jul 11, 2015 at 9:31am UTC
jjwooyoung
(8)
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?
Jul 11, 2015 at 9:36am UTC
Peter87
(6678)
The get() function reads
one character
.
If you want to read numbers you should consider using the >> operator.
Registered users can post here.
Sign in or register
to post.
C++
Information
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs