Would you like to react to this message? Create an account in a few clicks or log in to continue.



 
HomeLatest imagesRegisterLog in

 

 [C++ TuT] Getting Password

Go down 
3 posters
AuthorMessage
Desu
Member
Member
Desu


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

[C++ TuT] Getting Password Empty
PostSubject: [C++ TuT] Getting Password   [C++ TuT] Getting Password EmptySun 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
MrJohn10210


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

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

I dont Really Get It Sorry Sad


:halloween:
Back to top Go down
MrJohn10210
Site Monster
Site Monster
MrJohn10210


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

[C++ TuT] Getting Password Empty
PostSubject: Re: [C++ TuT] Getting Password   [C++ TuT] Getting Password EmptyFri 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
Back to top Go down
Unknown
Site Monster
Site Monster
avatar


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

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

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





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

Back to top Go down
 
[C++ TuT] Getting Password
Back to top 
Page 1 of 1

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