Porting JamesM's tutorials to c++, ran into 1 issue.
Posted: Tue Jun 08, 2010 10:37 pm
So I have been going through the usermode tutorial, and changing things to make it compile in g++ 4.5 (cross)
I've fixed a bunch of stuff, but I am not sure about the following...
I am trying to initialize an array:
Where those three functions are:
However g++ is throwing the following errors...
I have tried a couple of different things, but I am getting the feeling this might be illegal in c++...
Hopefully I am just missing something obvious.
Thanks in advance,
Rich
I've fixed a bunch of stuff, but I am not sure about the following...
I am trying to initialize an array:
Code: Select all
static void *syscalls[3] =
{
&monitor_write,
&monitor_write_hex,
&monitor_write_dec,
};
Code: Select all
void monitor_write(char *c);
void monitor_write_hex(u32int n);
void monitor_write_dec(u32int n);
Code: Select all
error: invalid conversion from 'void (*)(char*)' to 'void*'
error: invalid conversion from 'void (*)(u32int)' to 'void*'
error: invalid conversion from 'void (*)(u32int)' to 'void*'
Hopefully I am just missing something obvious.
Thanks in advance,
Rich