Archived

This topic is now archived and is closed to further replies.

Loading a texture file into my C++ Program

This topic is 5145 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi. I am writing a small program just to practice texturemapping in OpenGL. I write as I have been told, but when I compile, I get two errors: error C2059: syntax error : 'string' the line where I have this file is: AUX_RGBImageRec *LoadBMP(char *("af.bmp")) What is wrong??? And the second error is: error C2664: 'LoadBMP' : cannot convert parameter 1 from 'char [7]' to 'char *(__cdecl *)(void)' There are no context in which this conversion is possible The line where I have this error, is: if (TextureImage[0]=LoadBMP(("af.bmp"))) Can someone help me out here? HunterX [edited by - HunterX on November 11, 2003 1:00:41 PM]

Share this post


Link to post
Share on other sites
AUX_RGBImageRec *LoadBMP(char *("af.bmp"))

is that objective C?
well for C/C++ that isn''t allowed...
I guess LoadBMP is a function defined by yourself...
so it must be defined as either
AUX_RGBImageRec *LoadBMP(char *filename)
or
AUX_RGBImageRec *LoadBMP(char *filename = "af.bmp")

Share this post


Link to post
Share on other sites