Sep 17, 2011 at 12:35am UTC
#include<iostream>
#include<fstream>
using namespace std;
int main()
int username;
int password;
{
ofstream outputfile;
outputfile.open("test")
cin>> password;
cin>> username;
outputfile.close();
return 0;
}
i keep getting a syntax error saying 'int' should be preceded by ';' and '{' : missing function header (old-style formal list?).... what am i doing wrong??
Sep 17, 2011 at 12:38am UTC
You are declaring variables between the main() function name and the beginning of the function. Don't do that; move them inside.
Sep 17, 2011 at 12:39am UTC
try moving your first { to where it is positioned under int main()
Sep 17, 2011 at 1:07am UTC
thanks guy, sorry im new to this!