1.getline() 用getline读取文本
1 int main() 2 { 3 string line; 4 getline(cin,line,‘$‘);//‘$‘can change to other 5 cout<<line; 6 }
时间: 2024-10-07 01:34:43
1.getline() 用getline读取文本
1 int main() 2 { 3 string line; 4 getline(cin,line,‘$‘);//‘$‘can change to other 5 cout<<line; 6 }