Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need help! ( Yes i am noob o.0 )
#1
Hey guys i just tried to code a "very simple login system"
But when i try to compile it says that the last } is a error.
If you don't understand my error then look at this picture:
Screenshot (Click to View)
here is my code:
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");
}
Reply


Messages In This Thread
Need help! ( Yes i am noob o.0 ) - by w00pz - 02-09-2011, 07:31 AM
RE: Need help! ( Yes i am noob o.0 ) - by Gaijin - 02-09-2011, 08:29 AM
RE: Need help! ( Yes i am noob o.0 ) - by Untouch - 02-09-2011, 08:40 AM
RE: Need help! ( Yes i am noob o.0 ) - by w00pz - 02-09-2011, 01:14 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)