SRC\file.c:204: error: [#142] expression must have pointer-to-object type Reason: I've got this error when forgot to mention a field of the struct, which was an array. It was resulted into a code which treated a struct as an array, trying to access an array element at specific index. Example 1: typedef struct { char * name; int params[5]; } structType; void main() { structType var; int b = var[3]; /* Here we get this error */ int b = var.params[3]; /* solution */ }
0 Comments
Your comment will be posted after it is approved.
Leave a Reply. |
AuthorWarnings are important! Archives
May 2017
Categories |