LOL firstPerson you're at it again.
Stop and engage your grey matter before your EGO flares up and takes over.
I never said using a map was invalid...
Yes YOU would, and YOU would probably be right. But this isn't about you.
Look at the OP's code. Look at his number of posts. Do you think he is advanced to understand your code. This is something a whizz kid would come up with after using c++ for a long time. All your code does is present itself as a cerebral mind numbing exercise for the OP. What do you think his professor is getting the student to achieve here? This task can be achieved simply using just arrays and procedural logic. A student must learn to walk before he can run. Comprende?
Hahaha, I don't speak spanish. Anyways, he did not mention anything about this being a h.w assigned by his professor. For all I know he might be doing this for practice, thus suggesting something better. And I don't think my code was hard to understand, in fact there shouldn't be any troubling understanding it unless one never seen std::map before.
>>I never said using a map was invalid...
Well...."Why should he use a std::map for this?". From that I got, "he shouldn't use map", which is a little variation of "using map here is bad". Maybe just misinterpretation.
Anyways, my code was just a suggestion. OP does not have to follow it. Thats …