Jan 2, 2013 at 11:13pm UTC
can someone tell me the difference between this declaration and the function useage:
void *cube_updater(void *); // in header file
cube_updater ( void *rs232_cube) // in main.c
Jan 2, 2013 at 11:30pm UTC
The first one is a correct function declaration.
The second one shall not be compiled.
That is the difference.:)
EDIT: maybe in the second case the record should be
cube_updater ( ( void * ) rs232_cube);
Last edited on Jan 2, 2013 at 11:32pm UTC
Jan 3, 2013 at 12:34am UTC
I changed the function usage to
cube_updater((void*)rs232_cube)
That resolved part of the problem, but the following error was left, the syntax of which I don't understand;
main.c LINE 92 error: expected declaration specifiers or ‘...’ before ‘(’ token|
||=== Build finished: 1 errors, 1 warnings ===|
Line 92 reads:
cube_updater ( (void *)rs232_cube) // as modified per viad from moscow
Jan 3, 2013 at 2:15am UTC
I see that there is no semicolon after the statement. Also it is not clear whether the original code contained the function declaration or the function call as I thought.