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