Changing the loop control variable to the type char(which was type size_t initially) in a program which manipulates a string in C++
I was learning C++ from the C++ primer book(5E) and the exercise 3.6 says,
“Use a range for to change all the characters in a string to X.” .
I instead tried to take a little bit further by changing all but the last 4 characters to X like for a credit card detail.