Pointer Help [rookie in C]
Hi, im new at C so I dont understand that much yet about pointers...
what i have is this function:
Code:
char * currentboard(void *arg)
{
static char result;
result = currentBoard("XXX");
return &result;
}
XXX - this argument must be *char, but i want to use the "arg" *void that is above as an input. thefore I have to cast from void to char, so I do: (char*)argp. Then the complment statement is:
result = currentBoard((char*)argp);
But when I'm going to compile I got this error:
"error: void value not ignored as it ought to be"
So, what am I doing wrong ? plz help!