Comp Sci The AnswerCreate C++ Program for Username & Password

  • Thread starter Thread starter mayeh
  • Start date Start date
  • Tags Tags
    C++ Strings
AI Thread Summary
The discussion revolves around creating a C++ program that prompts users for a username and password, with the password input masked. Users are allowed three attempts to enter the correct password; failing this results in an "ERROR" message and program termination. The original poster expresses confusion about the assignment, indicating a lack of clear instruction on the topic. Forum members emphasize the need for more information on specific challenges faced in the programming process to provide effective assistance. The conversation highlights the importance of understanding both the program's requirements and the limitations of platform-specific implementations.
mayeh
Messages
14
Reaction score
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
maybe this will help you:

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

do you have any idea how to proceed?
 
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)
 

Similar threads

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