I dont know if the problem is the way I use getline.
If I run this little program, it is supposed to read a string, a number...5 times, but it does not, after the second atepmt,
the program goes crazy.
I tried a fix I was given (STLFix), and still doesn't work,
I found an article in microsoft to solve the getline bug, but
I can't find where to fix it, how do I get to the header to
change it ?
http://support.microsoft.com/default...;EN-US;q240015
anyway, this is the little program, it is getline or the program
the one that doesn't work?
thank you if you guys can be VERY explicit with your guidelines.Code:#include<iomanip> #include<iostream> #include<string> using namespace std; main() { string str; int num; for(int i=0;i<5;i++){ cout<<endl<<"String "; getline(cin, str, '\n'); cout<<"Number "; cin>>num; } return 0; }



LinkBack URL
About LinkBacks


