解决VC6 getline函数需要输入两次回车才能输出的问题

 来源:http://support.microsoft.com/kb/240015/en-us

C:\Program Files (x86)\Microsoft Visual Studio\VC98\Include,找到string文件,修改如下:

  
  
  
  
  1. else if (_Tr::eq((_E)_C, _D)) 
  2.                 {_Chg = true
  3.               //  _I.rdbuf()->snextc(); /* Remove this line and add the line below.*/  
  4.            _I.rdbuf()->sbumpc(); 
  5.                 break; } 

你可能感兴趣的:(职场,VC6,休闲,getline)