#include <iostream>
#include <list>
using namespace std;
string song = "CDE";
int songlength = song.length();
int counter = 0;
int main() {
cout << songlength << endl;
for (int i = 0; i < songlength + 1; i++, counter++) {
list<string> songlist;
songlist.push_back(song[counter]);
if (counter <= songlength) {
}
}
}
I am a beginner and I do not know much about this programming language.
Error:
error: no matching function for call to 'std::__cxx11::list<std::__cxx11::basic_string<char> >::push_back(__gnu_cxx::__alloc_traits<std::allocator<char> >::value_type&)'