Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Password change in C++

Reply
Thread Tools

Password change in C++

 
 
Sigi
Guest
Posts: n/a
 
      06-13-2005
Hi guys. I am new member in this group. I am also new to Visual C++. I
am developing a new system. I have a password to enter the system. The
user should have a choice to change his/her password anytime. The
password should be 8 char ending with an #. Could someone help me &
show how it is done.

 
Reply With Quote
 
 
 
 
ben
Guest
Posts: n/a
 
      06-13-2005
> Hi guys. I am new member in this group. I am also new to Visual C++. I
> am developing a new system. I have a password to enter the system. The
> user should have a choice to change his/her password anytime. The
> password should be 8 char ending with an #. Could someone help me &
> show how it is done.
>


For the whole thing, no. What a small and trivial part, yes. Which part?


 
Reply With Quote
 
 
 
 
Howard
Guest
Posts: n/a
 
      06-13-2005

"Sigi" <> wrote in message
news: oups.com...
> Hi guys. I am new member in this group. I am also new to Visual C++. I
> am developing a new system. I have a password to enter the system. The
> user should have a choice to change his/her password anytime. The
> password should be 8 char ending with an #. Could someone help me &
> show how it is done.
>


What part do you need help with? What do you have so far?

Sounds like a homework assignment. I find it difficult to believe you're
developing an entire "system", but don't know how to have the user enter a
string. If it's not homework, then why make the password exactly 8
characters, and why add the # at the end? Those rules seem arbitrary, and
make the password less secure than a variable-length password.

Break the task into parts. First write a function that lets a user enter a
string. (Preferably, use std::string, unless you're required to use char
arrays for this.)

Then write another function that calls the first function, checks that it's
8 characters long plus the # at the end. If it doesn't meet those
requirements, have this second function loop, calling that first function
until the user gets it right. (You could provide some kind of special
keyword the user could enter that would cancel the operation, if desired.)

Finally, you'll need to write the "system" which allows the user to specify
that they *want* to change their password, including some way to store that
password (and I would assume some way to "log on" to the system in the first
place). But if this is homework as I suspect, you won't be writing that
part.

By the way, if you're wondering how to do like most password systems, and
show # or * characters instead of the characters the user is typing while
entering the password, you'll need to step outside standard C++ and use some
platform-specific features, since C++ doesn't provide facilities for that
kind of keyboard handling.

-Howard


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change a users password without knowing the old password nor the answer to the password question AAaron123 ASP .Net 1 01-16-2009 02:56 PM
Changing a users password without knowing the old password nor the answer to the password question AAaron123 ASP .Net 2 01-16-2009 02:08 PM
How can Administrator change the Password of existing User, without knowing his Old Password in Administer Security Tool ? Luqman ASP .Net 5 07-12-2007 09:29 AM
A Paradise DNS address change? What change? There was no change. Tony Neville NZ Computing 7 09-22-2006 01:02 PM
Password change not working for default password in cisco aironet 1200 Deepak K Cisco 2 04-19-2005 08:42 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57