[Solved] C++ reverse_iterator error

you should define your vector variable first : std::vector<string> mylist (5); then use a reverse_iterator for it : std::vector<string>::reverse_iterator rit = mylist.rbegin(); update: if you put using namespace std; then when you compile your code you will find that the problem with list={} because list is reserved class in namespace std so you can’t use … Read more