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