The AnswerCreate C++ Program for Username & Password

  • Context: Comp Sci 
  • Thread starter Thread starter mayeh
  • Start date Start date
  • Tags Tags
    C++ Strings
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 2K views
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)