SRC\file.c:163: error: [#41] expression must have arithmetic or pointer type Reason:
Example 1: /* Function prototype section */ void func(int param1); /* Parameter is value (not pointer) */ /* Implementation section */ void main(void) { func(NULL); /* Wrong call by reference to func, instead of call by value */ } void func(int param1) { /* Implementation */ } Example 2: /* Function prototype section */ void func(int* param1); /* Parameter is pointer */ /* Implementation section */ void main(void) { double var = 5; func(var); /* Wrong call by value to func, instead of call by reference */ } void func(int* param1) { /* Implementation */ }
0 Comments
Your comment will be posted after it is approved.
Leave a Reply. |
AuthorWarnings are important! Archives
May 2017
Categories |