Hi
I am learning C++ for the first time; I use Dev C++ as i am 14 with no cash;
My programe has two if statments in and i use the cin.get(); thing to see what i have done. but after the second if statment, the dos window with my programe in it, is gone.
What do i do; can someone help me plz:(
Code:#include <iostream>
using namespace std;
int main()
{
char N;
char Y;
int uname;
int pword;
cout << "Welcome to the hackers gateway\n" <<endl;
cout << "Do you have an account? Y or N (You need to say 'N' if you say"; <<endl;
cin >> N;
if (N == true);
{
cout << "Please type in your username\n";
cin >> uname;
cout << "And now your Password";
cin >> pword << endl;
cout << "You now have grated access to the hackers gateway\n";
cout << "Well done!";
cin.get();
}
cout << "To gain access to the hackers gateway";
cout << "Please enter your username\n";
cin >> uname;
cout << "Please enter your Password";
cin >> pword;
cout << "Checking username and password....";
if (uname AND pword == true);
{
cout << "Hello and Wellcome to the hackers gateway"; <<endl;
}
cin.get();
return 0;
}