I dont know i made this template because when i run the program it gives me an error saying no template found or something like that so i asumed that i need a template.
also ty for your help but i forgot to mention that i can not change the main...is there another way?
I feel terribly uneasy about this; I get the distinct impression that you are just typing in code without trying to understand what the code is doing. If the intent is to learn C++, it is better to write five lines of code that you understand rather than a hundred lines of code that you somehow got into a compilable state through a combination of blind trial and error and inspired guesswork.
If you do not understand something, read up on it, ask in the programming forum. Above all:
The most effective way to increase your knowledge is to try new problems in a controlled way. Pick one aspect of C++ that you haven't understood before and write a program that, aside from using that one aspect, uses only things that you have already mastered. Then do what it takes to understand what your program is doing - and why. - Andrew Koenig and Barabara Moo in 'Ruminations on C++'.
I'm not uneasy about your intention to learn; if that was not the case, I wouldn't have posted (again) in this thread. I start with the axiom that anyone who seeks help here genuinely wants to learn C++.
What I'm uneasy about is the way (I think) you are trying to learn.
Mr. JLBorges I know what the codes are supposed to do and what is the purpose of it.
Everyone have his own method of learning, i code twice a week, but still im a student not Bill Gates, so im expected to not know every single letter in c++ and i dont think if someone asks for a bit of help it will make him learn in a bad way :/