|
Hi all, sorry if this is a rediculously trivial problem, but I'm having some
problems with execi on legos0.2.5 , I can't seem to get g++ to compile when
I use it, I pass it a 'correct' function.....like so :
int controlThread(int argc, char **argv) { ....blla....blah..blah }
defined earlier in file....
execi(&controlThread, 0, NULL, 2, DEFAULT_STACK_SIZE);
And it throws an error, saying :
ANSI C++ forbids implicit conversion from `void *' in argument passing
now I've tried to cast controlThread to (int) *(int, char**) but it doesn't
help...just gives me a parse error,
Its been a long time since I've done C++ code so I'm just getting back into
it, have I done something stupid here..
Thanks - Ciaran
|
|
Message has 1 Reply: | | Re: execi and C++
|
| (...) In C you should call execi() like this: execi(controlThread, 0, NULL, 2, DEFAULT_STACK_SIZE); /* Removed `&' */ since a function is like an array name: it is an address. Probably the same applies to C++. bye Bernardo (24 years ago, 18-Feb-01, to lugnet.robotics.rcx.legos)
|
3 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|