Original Post
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?