获取键盘输入

获取带有空格的输入

#include <iostream>              // std::cout

#include <string>
using namespace std;
int main(){
    string str;
    getline(cin, str); //获取带有空格的输入  
    cout << str;
    return 0;
}

 

posted @ 2016-09-18 10:57  于光远  阅读(142)  评论(0编辑  收藏  举报