0
夥計們,讓我們說一句我怎樣才能用Visual C++將一個句子分成單詞
string sentence =「你好,我喜歡C++編程語言!
,我希望把每個字到字符串數組...我想我可以用一個分隔符
size_t space = sentence.find(" ");
string words[]; //putting individual words here
for(int i=0; i < sentence.length(); i++)
{
words[i] =
//incrementing delimiter to next space here
}
知道的任何幫助。由於
檢查此http數組更好://計算器.com/questions/236129/how-to-split-a-string – Pepe 2011-02-15 06:46:41
Visual C++不是一種編程語言。 P.R.已經鏈接到如何在C++中分割字符串的答案。 – 2011-02-15 06:51:22