私は本から自分自身にCを教えており、クロスワードパズルを作成しようとしています。文字列の配列を作成する必要がありますが、問題が発生し続けます。また、配列についてはよくわかりません...
これはコードの一部です:
char word1 [6] ="fluffy", word2[5]="small",word3[5]="bunny";
char words_array[3]; /*This is my array*/
char *first_slot = &words_array[0]; /*I've made a pointer to the first slot of words*/
words_array[0]=word1; /*(line 20)Trying to put the word 'fluffy' into the fist slot of the array*/
しかし、私はメッセージを受け取り続けます:
crossword.c:20:16: warning: assignment makes integer from pointer without a cast [enabled by default]
何が問題なのかわからない...文字列の配列を作成する方法を調べようとしましたが、運がありません
どんな助けでも大歓迎です、
サム