【求助】istringstream如何在输入一次后获取剩余的流字符串
istringsream input("-3aaa");
int temp;
input >> temp;
istringsream input("-3aaa");
int temp;
std::string s;
input >> temp >> s;
#include <string>
#include <sstream>
#include <iostream>
using namespace std;
int main(int argc, char* argv[])
{
istringstream input("-3aaa");
int temp;
string str;
input >> temp;
input >> str;
cout << temp << endl;
cout << str << endl;
return 0;
}