Hello, I'm trying to move a c project in c++. I just tried to change extension to main.c to main.cpp but I get an error including ucos_ii.h at OsTaskCreateExt and I cannot find what i going wrong with the function declaration. Can anyone help me? Thanks Michele
I tried to change the function declaration from
OSTaskCreateExt(void (*task)(void *pd), ..
to
OSTaskCreateExt(void (*INT16U)(void *pd), ...
Can it be that "task" is not declared? Doesn't it know what it is? I searched in ucos ii .h files and I cannot find a declaration for "task".
"Can it be that "task" is not declared?"
In a function pointer theclaration:
STaskCreateExt(void (*task)(void *pd), ..
"task" is just an arbitrary name for this parameter, just as:
int sum(int a,int b);
the parameter names a and b are arbitrary names.
It will not be problematic unless "task" is a reserved keyword, or possibly the name of a data type.