OpenGL: A Primer (2002) pg 150

I’m trying to load a file (grass.ppm) and then texture map it to the ground, which is defined with GL_QUADS. I’ve been following the instructions in OpenGL: A Primer to read in the file, but it has the line:

image=malloc(3*sizeof(GLuint)*nm);

which just gives “cannot convert from ‘void *’ to ‘unsigned char *’”

Anybody know what it’s supposed to be? I’ve tried a few code snippets from around the web (including the nehe stuff) but none of it works. (I’m using Visual C++ under Win98)

image=(unsigned char*)malloc(3*sizeof(GLuint)*nm);

and if you want some further information, search “type casting” to understand what the above answer really means.