Search:
Forum
General C++ Programming
getline problem
getline problem
Jun 24, 2013 at 7:04pm UTC
coder1
(85)
when im using getline function (to input a string with spaces) with a for loop till 5 for example it only inputs 4 strings, why is that?
Jun 24, 2013 at 7:18pm UTC
JayzisLazy
(27)
its hard to understand what your asking here, could you please post the source code?
Jun 24, 2013 at 8:34pm UTC
coder1
(85)
1
2
3
4
5
string s;
for
(
int
i=0;i<2;i++) { getline(cin,s); }
it only reads one string, why is that?
Topic archived. No new replies allowed.
C++
Information
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs