SRC\file.c:776: error: [#167] argument of type <type> is incompatible with parameter of type <type> Reason: You are trying to use variable of one type, where another type is declared to be used.
Example: 1. /* Function prototype section */ void func(int param1); /* Declaration of func in prototype section with param1 of type int */ /* Implementation section */ void main(void) { double var = 5; func(var); /* Call to func with param1 of type double */ } void func(double param1) /* Declaration of func in implementation section with param1 of type double */ { /* Implementation */ } 2. /* Function prototype section */ void func(int* param1); /* Declaration of func in prototype section with param1 of type "pointer to int" */ /* Implementation section */ void main(void) { int var = 5; func(var); /* Wrong: Call to func with param1 of "int" type */ }
0 Comments
Your comment will be posted after it is approved.
Leave a Reply. |
AuthorWarnings are important! Archives
May 2017
Categories |