Jump to content
  • Advertisement


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


Loading a texture file into my C++ Program

This topic is 5489 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)
AUX_RGBImageRec *LoadBMP(char *filename = "af.bmp")

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!