???? ?????? ???? getline ???? ?????? ??? ???????? ??????

?????? ????????? ?????? ?????????
???? ???????: 240015 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

???????

???? ?????? getline ???? "????? C++ ????????" ???? ?????? ??? ???????? ??????. ?????? ?????? ??? ????? ???????? ?? ????? "???? ?? ?????????" ?????? ??? ????????.

????

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

				
?????? ??? ????? ????? ????? ??? ??? ????, ???? ??????? ???? ???? ?? ????? ?? ??? ??? ?? ??? ?????. Microsoft ??? ?????? ?? ?? ??????? ??????? ?? ??????? ??? ????? ???? ??? ????? ??? ??????.

?????

???? Microsoft ?? ??? ??? ?? ?????? Microsoft ??????? ?? ??? "????? ???".?? ????? ??? ??????? ?? Microsoft Visual C++ .NET.

??????? ????

???? ????? ???????? ?????:
//test.cpp
//Compiler options : /GX
#include <string>
#include <iostream>
int main () {
	std::string s,s2;
	std::getline(std::cin,s);
	std::getline(std::cin,s2);
	std::cout << s <<'\t'<< s2 << std::endl;
	return 0;
}

Actual Results:
Hello<Enter Key>
World<Enter Key>
<Enter Key>	
Hello   World

Expected Results:
Hello<Enter Key>
World<Enter Key>
Hello   World
				

???????

???? ???????: 240015 - ????? ??? ??????: 28/???/1426 - ??????: 3.0
????? ???
  • The Standard C++ Library, ????? ?????? ??:
    • Microsoft Visual C++ 6.0 Enterprise Edition
    • Microsoft Visual C++ 6.0 Professional Edition
    • Microsoft Visual C++, 32-bit Learning Edition 6.0
????? ??????: 
kbmt kbtshoot kbprb kbbug kbfix kblangcpp kbnoupdate kbstl kbtemplate KB240015 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????240015

????? ???????

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com