配列を割り当てました
char words[100][100];
ここで、単語とその位置を行に保存したいと思います。行に「こんにちは私はプログラマーです」があるとします。今、私は保存したい
string word;
while(line){
//called a function to get the word and position.
words[word]["pos"] = pos;
}
を分割words
して文字列word
に保存しましたが、保存しようとするとエラーが発生します。
"No viable overloaded operator[] for type 'char[100][100]"
私は何を間違っていますか?