getline 函数

    #include <bits/stdc++.h>
    #include <string>
    using namespace std;
    string s;
    int main()
    {
        getline(cin,s);
        cout<<s<<endl; 
        /*
        fsw sf
        fsw sf
        */
        cin>>s
        cout<<s<<endl;
        fsw sf
        fsw 
        return 0;
    }

 

posted on 2019-09-18 15:17  cltt  阅读(130)  评论(0编辑  收藏  举报

导航