BTW, FUNCPTR and VOIDFUNCPTR are custom types. I don't have Wind River in front of me at the moment so I can't find the definitions of FUNCPTR and VOIDFUNCPTR for you. But I think VOIDFUNCPTR defines a function that returns void and FUNCPTR defines a function that returns an integer. Apparent, the task function should be returning an integer. Probably wouldn't matter but more correctly:
Code:
static int TestTaskFunction(void)
{
std::cout<<"task has been started"<<endl;
return 0;
}
4174robot::4174robot()
{
task1 = new Task("testtask", (FUNCPTR) TestTaskFunction);
}
BTW, in WPILib\task.h, the Task class constructor is defined as:
Code:
Task(const char* name, FUNCPTR function, INT32 priority = kDefaultPriority, UINT32 stackSize = 20000);
So it is expecting the type FUNCPTR.