[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tutorial to Linux gaming



vilohidi@mbnet.fi wrote:
> 
> In Alexander Courbot's tutorial there was this kind of function as
> main:
> 
> int displaypcx(int argc, char **argv);
> 
> I changed it so that it can be called from an other program (I
> think).
> 
> But how should I call it?
> 
> char tausta[] = "tausta.pcx";
> int main()
> {
> displaypcx(2, tausta[1]);
> }
> 
> warning: passing arg 2 of 'displaypcx' makes pointer from integer
> without a cast

You're passing a char ('t' to be exact) where the function requires a
char** (pointer to a string).  If i'm not mistaken (and it's been known
to happen), your code should look like this:

char *tausta[] = "tausta.pcx";
int main(void){
	displaypcx(2, tausta);
}

Try that.

-BenC