HomeRegisterLog in

Share | 
 

 [C++ TuT] Getting Password

View previous topic View next topic Go down 
AuthorMessage
Desu
Member
Member
avatar

Posts : 27
Rep : 0
Join date : 2010-10-01
Age : 21
Location : Office

PostSubject: [C++ TuT] Getting Password   Sun Oct 03, 2010 9:44 pm

Here's a simple getting password tutorial.
First, you'll start off with the #includes.
Code:
#include <iostream>
#include <windows.h>
Simple, right? Not that hard. Now we move on to the main.
Code:
using namespace std;
int main()
Now here is where it gets a little tricky. First, you'll need the string.
Code:
string pass;

That's the main thing you want. Now here, we'll go to the main box message. It's going to ask you, to enter a password. But, you can change it. I'm just using an example.
Code:
 cout<<"Please enter the hidden password. Here's a hint. Program"<<endl;
So far, you should have it looking like this.
Code:
#include <iostream>
#include <windows.h>
using namespace std;
int main()
{
      string pass:
      cout<<"Please enter the hidden password. Here's a hint. Program"<<endl;
Now we move into the password. You can change the password, I'm just using an example here.
Code:
cin>>pass;
      if(pass == "ProgrammingThatWish")
      {
Now, ProgrammingThatWish is the password.
Now, here is when you enter the password right, you'll get this message.
Code:
cout<<"Password was correct! Welcome, to Programming Wish. Where you can program any kind of wish.";
                        }
                        else
                        {
Your message will be "Password was correct! Welcome, to Programming Wish. Where you can program any kind of wish" That's your message.
Now, lets move into where you enter the password, wrong.
Code:
cout<<"Password is incorrect! Plase, don't try that.";
                              }
That's when you get the password wrong!
Now, you'll need this.
Code:
system("PUASE>>NULL") ;
      return 0;

}
That's the end of the whole script. Now, you should have this by now.
Code:
#include <iostream>
#include <windows.h>
using namespace std;
int main()
{
      string pass:
      cout<<"Please enter the hidden password. Here's a hint. Program"<<endl;
      cin>>pass;
      if(pass == ProgrammingThatWish")
      {


                        cout<<"Password was correct! Welcome, to Programming Wish. Where you can program any kind of wish.";
                        }
                        else
                        {

                              cout<<"Password is incorrect! Plase, don't try that.";
                              }

      system("PUASE>>NULL") ;
      return 0;

}
If not, fix it. If you have any questions, come and ask. Wink But for now, that's the end of it.
Back to top Go down
http://www.programmingwish.net
MrJohn10210
Site Monster
Site Monster
avatar

Posts : 107
Rep : 3
Join date : 2010-09-30

PostSubject: Re: [C++ TuT] Getting Password   Wed Oct 27, 2010 3:36 am

I dont Really Get It Sorry Sad


:halloween:

________________________________________
Hello
Back to top Go down
MrJohn10210
Site Monster
Site Monster
avatar

Posts : 107
Rep : 3
Join date : 2010-09-30

PostSubject: Re: [C++ TuT] Getting Password   Fri Nov 26, 2010 8:32 am

chibi kid wrote:
at first i thought that this was like a fake gaia online page to were u see peoples pass and users
spam

________________________________________
Hello
Back to top Go down
Unknown
Site Monster
Site Monster


Posts : 351
Rep : 0
Join date : 2011-01-01

PostSubject: Re: [C++ TuT] Getting Password   Wed Jan 05, 2011 8:53 pm

I don't understand it either.
Back to top Go down
Sponsored content




PostSubject: Re: [C++ TuT] Getting Password   

Back to top Go down
 
[C++ TuT] Getting Password
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» Forgot Account Name and Password ?
» How to change your Battlenet account password.
» How DO i change Password
» New hinari password 1/9/2014
» Chest Journal Password

Permissions in this forum:You cannot reply to topics in this forum
 :: Technology and Software :: Programming-
Jump to:  
Forum create on Forumotion | © phpBB | Free forum support | Contact | Report an abuse | Free forum