hello i'm trying to figure out how to write a program in c++ that check when i insert a password and force me to add at least 2 capital letters and 2 numbers in the password (you've seen this before right? when signing up for new account and checks for password stringth)
otherwise won't accept it and gives the output "password not accepted"
anyone can write a simple code for that?
Ahmed91za
0
Newbie Poster
Recommended Answers
Jump to PostWell if you store the password as a
std::string
then you can iterate over each character and check if it is upper or lower case with
Jump to PostYou can also try this.
This is according to your posthello i'm trying to figure out how to write a program in c++ that check when i insert a password and force me to add at least 2 capital letters and 2 numbers in the password (you've seen …
All 7 Replies
NathanOliver
429
Veteran Poster
Featured Poster
Ahmed91za
0
Newbie Poster
NathanOliver
429
Veteran Poster
Featured Poster
Ahmed91za
commented:
thanks
+0
richieking
44
Master Poster
ravenous
266
Posting Pro in Training
NathanOliver
429
Veteran Poster
Featured Poster
ravenous
266
Posting Pro in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.