int main() { string line,b; getline(cin,line); stringstream ss(line); while(ss>>b) { cout<<b<<endl; } }
int main() { string s; while(getline(cin,s,'#')) //默认换行为enter,这里重载成# cout<<s<<"$"; }