Hello
I am trying to build a c++ that reads user input and arrange letters in ascending order.
for example, if the user input: Hello my name is Moe!
the output will be: !aeeehillmmmnoos (ascending order)
my problem is that when i input hello my name is moe
the output will be ehllo (not completing other letters)
also when i change class size to 50, it outputs unknown weird letters.
This is my code:
You are sorting based on the compile time constant CLASS_SIZE.
What if the user entered fewer than that many characters?
You're going to be sorting uninitialized positions in s_letters.