#include <iostream>
usingnamespace std;
int main();
{
int Password;
cout<<"Please write the password: ";
cin>> Password;
cin.ignore();
if ( Password == 123 )
cout<<"You are now logged in\n";
else {
cout<<"Wrong password\n";
while ( Password !=123) {
cout<<"Please write the password: ";
cin>> Password;
cin.ignore();
if ( Password == 123 )
cout<<"You are now logged in\n";
else {
cout<<"Wrong password\n";
}
}
}
}
When I try to compile it i get the error message: error: expected unqualified-id before '{' token
I am using code blocks and the error is the { under int main();