Help

Does anybody have any idea on what's wrong here?

In function `int _mangled_main()': 
expected primary-expression before '.' token 
[Build Error]  [main.o] Error 1 


From the following program:

main:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <allegro.h>
#include "System.h"

int main()
{
	System system;
	
	System.Setup();
    
	BITMAP *buffer = create_bitmap( 640, 480 );

	while ( !key[KEY_ESC] )
	{
        rectfill(buffer, 0, 0, 640, 480, makecol(255, 0, 0));   
		blit( buffer, screen, 0, 0, 0, 0, 640, 480 );
		clear_bitmap( buffer );
	}
	
	destroy_bitmap( buffer );
	
	return 0;
}
END_OF_MAIN();


System.h:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <iostream>

class System
{
 
    private:
        
        int screenWidth, screenHeight;
        bool fullscreen;
          
    
    public:
        
        System();
        ~System();
        void Setup();
          
};   


System.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <iostream>
#include "System.h"

void System::Setup()
{
    allegro_init();
	install_keyboard();
	install_timer();
	install_mouse();
	install_sound( DIGI_AUTODETECT, MIDI_AUTODETECT, 0 );
	set_color_depth( 16 );
	
	bool fullscreen = false;
	
	if ( fullscreen == true )
    {   
		set_gfx_mode(GFX_AUTODETECT, 640, 480, 0, 0);
    }
    
    else
    { 
		set_gfx_mode(GFX_AUTODETECT_WINDOWED, 640, 480, 0, 0);
    }
}


Thanks.
Line 8 in main(): watch your capitalization.
Ah stupid mistake, thank you
Topic archived. No new replies allowed.