Hello. CPnewbie here. I need to make this completely functional code that converts all lower case letter from the user's input to upper case also only allow 11 characters for the input. I would like for when they exceed the limit it to either say "you have exceeded the limit, try again" or just show the first 11 characters only or even just end the program... here is the code,...
To combine and polish what the two posters above me said:
Use std::string instead of a char array is what firedraco said, and I'm all for that. It's excellent advice IMO. Then, from there, when you need the length, use stringNaem.length(), which returns an unsigned int you can use for comparisons. I think that is what AngelHoof wanted to say.
When I use the stringName.length() the limit actually goes within the () correct? Is this just a variable I need to place in the main function as a parameter and then reference it in my while loop? How can I place that in my while loop to say basically while the input is less than 11 characters, change all lowercase to uppercase and if it's greater than 11 character input, tell them it has exceeded the maximum input and try again?
Thanks!