模板

C++输入方式input

2019-03-23  本文已影响0人  Goshowwww

对坑爹的输入的两种输入方式

#include <iostream>
#include <map>
#include <sstream>
using namespace std;


int main() {
    string str;
    while (getline(cin, str)) {
        int s;
        stringstream stm(str);
        while (stm >> s) {
            
        }
    }
    return 0;
}
int main() {
    char str[500];
    while (gets(str)) {
        cout << str;
    }
    return 0;
}
上一篇 下一篇

猜你喜欢

热点阅读