Skip to main content
GameDev.net gamedev.net
🔒 Locked

Simple class problem loading BMP

Started by Mike9285 May 17, 2003 at 3:44 PM 1 replies 250+ views
Original Post
Mike9285
Mike9285
error C2440: ''return'' : cannot convert from ''struct _AUX_RGBImageRec *'' to ''struct _AUX_RGBImageRec Setup::*'' I put the LoadBMP function from the tutorials into its own class called Setup. It returns the error above on the line where it returns auxDIBImageLoad(Filename); //.........Header File........ class Setup { public: AUX_RGBImageRec *LoadBMP(char *Filename); (removed code) //............................ //.........Source File........ AUX_RGBImageRec Setup::*LoadBMP(char *Filename) { FILE *File=NULL; if (!Filename) { return NULL; } File=fopen(Filename,"r"); if (File) { fclose(File); return auxDIBImageLoad(Filename); } return NULL; } Why can''t I do this?
Annon
Annon
what about AUX_RGBImageRec* Setup::LoadBMP(char *Filename)?
Mike9285
Mike9285
Thanks...

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.