am wrting a password program in c++ but its not working, some error, says "missing function header (old-style formal list?)"
#include "stdafx.h"
#include <iostream>
using namespace std;
int main();
{
int password = 1234;
int password2 = 0000;
int x = 0;
cout << "Please enter the password2";
cin >> password2;
{
while (password!=password2);
cout << "wrong password";
cout << "Please enter password2 again";
cin >> password2;
x++;
for ( ;x>2; );
cout<<"Too many tries";
cout<<"program wil now exit";
exit (0);
}
if (x>3)
cout<<"Access Granted";
return 0;
}