I am currently learnning c++ from a text book. but I have come accross an error when trying to run the program.
The error reads like this:
fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "StdAfx.h"' to your source code?
My code reads:
include <iostream>
include <string>
using namespace std;
int main()
{
string username;
string password;
bool success;
cout<<"\tGame Designer's Network\n"<<endl;
do
{
cout<<"Username: "<<endl;
cin>>username;
cout<<"Password: "<<endl;
cin>>password;
if (username == "Naughty Dog" && password == "Uncharted")
{
cout<<"Hey, Drake\n"<<endl;
success=true;
}
else if (username == "Nintendo" && password == "Mario Bros")
{
cout<<"Oh mama mia, it's luigi.\n"<<endl;
success=true;
}
else if (username == "Bongie" && password == "Halo")
{
cout<<"Welcome, Master Cheif.\n"<<endl;
success= true;
}
else if (username == "gues" || password == "guest")
{
cout<<"Welcome, guest.\n"<<endl;
success= true;
}
else
{
cout<<"invalid password or username, plaese try again.";
success=false;
}
} while (!success);
return 0;
}