Whats wrong with my class?

im making this class(im following a tutorial) and it wont work, i cant se whats wrong x_x..
source code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
class System
{
      public:
             void Setup();
             bool fullscreen;
}

void System::Setup()
{
    fullscreen = false;
    std::cout <<"fullscreen is false\n";
    allegro_init();
    std::cout <<"allegro is inited\n";
    install_keyboard();
    std::cout <<"the keyboard is inited\n";
    install_timer();
    std::cout <<"time is ticking\n";
    install_mouse();
    std::cout <<"do mouse is a live!\n";
    install_sound(DIGI_AUTODETECT , MIDI_AUTODETECT , 0);
    std::cout <<"sound is waving\n";
    set_color_depth(16);
    std::cout <<"16 bits of awesomeness\n";
    if(fullscreen = false)
    {
        set_gfx_mode(GFX_AUTODETECT, 640 , 480 , 0 , 0);
        std::cout <<"fullscreen\n";
    }else
    {
         set_gfx_mode(GFX_AUTODETECT_WINDOWED, 640 , 480 , 0 , 0);
         std::cout <<"windowed\n";
    }      
}

and the error:
1
2
3
4
5
6
15 C:\Dev-Cpp\main.cpp new types may not be defined in a return type 
15 C:\Dev-Cpp\main.cpp two or more data types in declaration of 'Setup' 
15 C:\Dev-Cpp\main.cpp prototype for 'System System::Setup()' does not match any in class 'System' 
10 C:\Dev-Cpp\main.cpp void System::Setup() 
15 C:\Dev-Cpp\main.cpp 'System System::Setup()' and 'void System::Setup()' cannot be overloaded 
 C:\Dev-Cpp\Makefile.win [Build Error]  [main.o] Error 1 
closed account (z05DSL3A)
Line 6 should have an ';' at the end.
Bah, stupid grammar inconsistency. You need a semicolon at the end of an aggregate type, but you don't need one after a function definition.
lol thanks :P
Topic archived. No new replies allowed.