我正在尝试使用空格作为分隔符来拆分字符串。我想将每个标记存储在一个数组或vector中。我试过了。stringtempInput;cin>>tempInput;stringinput[5];stringstreamss(tempInput);//Insertthestringintoastreaminti=0;while(ss>>tempInput){input[i]=tempInput;i++;}问题是,如果我输入“thisisatest”,数组似乎只存储input[0]=“this”。它不包含输入[2]到输入[4]的值。我也尝试过使用vector,但结果相同。