I am trying to make a list in my code, but when I follow online guides I just get error messages like
error: no matching function for call to ‘std::list >::insert(std::string&)’
What should I do?
Read the documentation.
std::list::insert() doesn't have an overload with only taking a single argument: std::string&.
You're doing something wrong.
Also, if you don't know how to use list, then probably you don't want to use list. Probably it's not even insert() that you're looking for.
If you want to have a collection of "things", you should be probably just fine using std::vector. Also, if you want to add an element to the collection, push_back() is the typical way to go.