The AnswerCreate C++ Program for Username & Password

  • Comp Sci
  • Thread starter mayeh
  • Start date
  • Tags
    C++ Strings
In summary, the conversation is about creating a C++ program that asks for a username and password, with the password being masked. If the user exceeds three errors, an "ERROR" message will be displayed and the program will exit. The person asking for help is not familiar with the topic and needs assistance, and provides a link that may be helpful. The other person asks for clarification on where the problem lies and mentions that the implementation will be platform-specific.
  • #1
mayeh
15
0
c++ strings help!

Homework Statement



Create a C++ program that would ask the user for a username and password. Password field should be masked. If the user exceeded three errors, a string will be seen on the screen which says “ERROR” and exits the program.

username: ayen_lee
password: zpobhabzabc21


Homework Equations



i'm sorry but i don't have any idea about this thing.. it wasn't taught to us clearly.. please help.
 
Physics news on Phys.org
  • #2
maybe this will help you:

http://www.cplusplus.com/reference/string/string/compare.html

do you have any idea how to proceed?
 
  • #3
mayeh said:
i'm sorry but i don't have any idea about this thing.. it wasn't taught to us clearly.. please help.
Where are you having problems? Understanding the question? Understanding how the program should behave? Outlining your program? Designing your program? Implementing a specific component of your program?

We can't effectively help you unless we know what you have already done and where you are having problems.


(Incidentally, your implementation will necessarily be platform-specific. For example, it is impossible to write that program to run in a linux console with only standard C routines)
 

FAQ: The AnswerCreate C++ Program for Username & Password

1. What is the purpose of creating a Username & Password program in C++?

The purpose of creating a Username & Password program in C++ is to provide a secure way for users to access a system or application. This program allows users to create a unique username and password combination to protect their personal information and ensure that only authorized individuals can access the system or application.

2. How does the program ensure the security of usernames and passwords?

The program uses various security measures, such as encryption and hashing, to store and protect the usernames and passwords. This makes it difficult for hackers to access the information, as they would need to decipher the encrypted data to obtain the usernames and passwords.

3. Can the program be used for multiple users?

Yes, the program can be used for multiple users. Each user can create their own unique username and password, and the program will store and manage these credentials separately.

4. Is it possible to reset a forgotten password?

Yes, the program can have a password reset feature in which users can answer security questions or provide other forms of identification to reset their password. This ensures that the user is the legitimate owner of the account.

5. Are there any potential drawbacks to using a Username & Password program in C++?

One potential drawback is that if the program is not well-designed or implemented, it could be vulnerable to hacking attempts. Additionally, if the user forgets their password and there is no password reset feature, they may not be able to access their account. It is important to regularly update and maintain the program to ensure its security and functionality.

Similar threads

Replies
15
Views
2K
Replies
21
Views
2K
Replies
14
Views
32K
Replies
5
Views
2K
Replies
13
Views
2K
Replies
1
Views
3K
Replies
7
Views
2K
Back
Top