0
Why this template can't accept a whole word? C++
I have this code, where I want to add a song name to the list, the problem is, when I tried to add for example "happy together", the program breaks and start and infinite loop, dunno understand why, if my template should recieve a std:: string. It only accepts one letter. My program is seperate in two files, Main.cpp and Lista.hpp. In lista.hpp you will find the class template. My main idea is to do the list Operation (insert, delete, find, etc.) And I want to do it with a template, it works fine with integers but with std:: string no... Hope someone can help me, thank you so much! https://code.sololearn.com/W98TntmN8mR0/?ref=app
2 Answers
+ 1
YOU ARE COMPILING YOUR C++ PROGRAM IN HTML..
Please choose C++ compiler.
0
Oh Dastageer haha good point, but the code it's just for visually representation, because I don't compile in sl, I will change it