小技巧C++程序输出等待

    xiaoxiao2021-03-25  156

    cin.get();

    cin.get();//如果程序在常规输入后留下了一个没有被处理的键击

    return 0;

    让程序等待,直到按下了enter键

    #include <iostream> using namespace std; int main() {     cout << "Come up and C++ me some time." ;     cout << endl;     cout << " You won't regret it!"<<endl;     cin.get();     return 0; }

    转载请注明原文地址: https://ju.6miu.com/read-36203.html

    最新回复(0)