刚开始我的做法 #include <iostream> using namespace std; int main() { char str[100] = { 0 }; cin.getline(str, sizeof(str)); // write your code here...... string s(str); string arr[3]; int count = 0, tem; int i = 0; while((tem = s.find(' ', count)) != s.npos){ ...