expected constructor, destructor, or type conversion before ‘*’ token

closed account (y8h7M4Gy)
So i've been working on learning openGL ( alongside with SFML ) ..

i keep getting this error and its driving me mad

expected constructor, destructor, or type conversion before ‘*’ token

here is the section of code where its happening

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
AUX_RGBImageRec *LoadBMP ( char *Filename ) {

	FILE *File=NULL;

	if ( !Filename ) {

		return NULL;

	}

	File = fopen ( Filename, "r" );

	if ( File ) {

		fclose ( File );
		return auxDIBImageLoad ( Filename );

	}

	return NULL;

}


ty in advance!
it would help if you gave us the exact line.

Also you probably want to open with "rb", not "r"
closed account (y8h7M4Gy)
oh sry, here...

1
2
expected constructor, destructor, or type conversion before ‘*’ token
AUX_RGBImageRec *LoadBMP ( char *Filename ) {
AUX_RGBImageRec isn't a type name.

You're either spelling it wrong or it doesn't exist in the library(ies) you're using.
closed account (y8h7M4Gy)
how could it not be right? i took it right off the tutorial website
The tutorial must be using some lib you don't have. Or a different version of the lib.

Or it's a bad tutorial.
closed account (y8h7M4Gy)
oh i found my issue... it was one of those F***ING VISUAL C++ TUTORIALS thx for your help though
Topic archived. No new replies allowed.