error: cannot convert 'std::vector<int>::iterator {aka __gnu_cxx::__normal_iterator<int*, std::vector<int> >}' to 'const char*' for argument '1' to 'int remove(const char*)
When I am doing
vec.erase(std::remove(vec.begin(), vec.end(), valToRemove), vec.end());
valToRemove is an int.
You were most likely trying to call this function instead the correct one. Probably you don't have <algorithm> included so the compiler can't see the overloaded version of the function.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With