You are missing 2 or 3 closing brackets.
Here you have the clean code, I think that would do it.
Few tips, instead of system("PAUSE"), use cin.get().
And instead of putting if's into if's try using if, else, else if or even switch.
Also, if I may suggest, use Code::Blocks
http://www.codeblocks.org/
Here you have the clean code, I think that would do it.
Code:
#include <iostream>
#include <windows.h>
#include <winable.h>
using namespace std;
int main(void)
{
string username;
cout << "Enter your username: ";
getline (cin, username);
if(username == "Rand0m")
{
string password;
cout << "Enter your password to access the program: ";
if(password == "iamcool")
{
string answer;
system("CLS");
cout << "Welcome back dude!";
Sleep(2000);
cout << "\nHow have you been?\n";
getline (cin, answer);
if(answer == "bad")
{
cout << "Sorry to hear that.";
}
}
}
system("PAUSE>nul");
}
Few tips, instead of system("PAUSE"), use cin.get().
And instead of putting if's into if's try using if, else, else if or even switch.
Also, if I may suggest, use Code::Blocks
http://www.codeblocks.org/