Record Detail

Compile Error

/in/inDictionary.c: In function 'main':
/in/inDictionary.c:12:2: error: 'totalWords' undeclared (first use in this function); did you mean 'dictWords'?
  totalWords = sizeof(words)/sizeof(words[0]);
  ^~~~~~~~~~
  dictWords
/in/inDictionary.c:12:2: note: each undeclared identifier is reported only once for each function it appears in
/in/inDictionary.c:15:36: error: expected expression before ']' token
   if (words[numWords] != dictWords[])   //If input words are not in dictionary (Need to fix code)
                                    ^
/in/inDictionary.c:15:3: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
   if (words[numWords] != dictWords[])   //If input words are not in dictionary (Need to fix code)
   ^~
/in/inDictionary.c:17:4: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
    printf("F\n");       //And print F for false/not in dictionary
    ^~~~~~
/in/inDictionary.c:18:3: error: 'else' without a previous 'if'
   else           //If input word is in dictionary
   ^~~~
cc1: all warnings being treated as errors

Information

Submit By
Type
Submission
Homework
Midterm Exam 2
Language
C
Submit At
2022-07-07 15:42:03
Judged At
2022-07-08 16:06:04
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes