摘要: 关于VC++6.0中getline函数的一个bug 最近在调试程序时,发现getline函数在VC++6.0和其他编译器上运行结果不一样,比如有如下这段程序:#include <iostream>#include <string>using namespace std;int main(void){ string str; getline(cin,str); cout<<str<<endl; return 0;} 在VC++6.0下运行时,比如说输入“123”,需要按两次回车键才会输出“123”。 而在C-Free和VS2010下运... 阅读全文
posted @ 2012-11-03 10:46 Matrix海子 阅读(3242) 评论(2) 推荐(1) 编辑