0
How can I replace a string of characters with x's
In my latest code, I am trying to get a string of text to be replace by x's. The problem I am running into is that it is only printing one x. string password; for (counter = 0; counter <= passwordLength; counter++) { cout<<"x"; } Full code below: https://code.sololearn.com/cRKP5pKbTdMI/?ref=app
3 Respuestas
+ 1
Meaning that password it taking is zero length.
here you are calculating password length before taking password input. count after taking input.
check these ones..
As you are using getline method you need to input with multi lines..
0
thank you! that seemed to do the trick!
0
Wel come