#include <iostream> #include <sstream> using namespace std; int main() { stringstream ss("hello world"); string temp; getline(ss, temp, ' '); cout << temp << endl; // hello getline(ss, temp, ' '); cout << temp << endl; // world }
CC-BY-SA 3.0 · Powered by MediaWiki
개인정보처리방침 · ABOUT