그냥 교체하십시오 getch()
~와 함께 cin.get()
이와 같이:
include <iostream>
using namespace std;
void main()
{
cout << "Hello World!" << endl;
cin.get();
}
자세한 내용은 참조하십시오 get () 함수 문서. 예를 들어, 사용자가 특정 문자를 누를 때까지 기다릴 수 있습니다.
void main()
{
cout << "Hello World!" << endl;
cout << "Press Q to quit." << endl;
cin.ignore(numeric_limits<streamsize>::max(), 'Q');
}