+ 3
Is there a solution in c++ if you get this error? Error: No match for operator <<
https://code.sololearn.com/cqphPCW6IqcA/?ref=app I'm learning about how to use vectors in c++, I want to print the return of the vector, but when I tried to do it with std::cout, I got this error: Error: no match for operator<< (operand types are 'std::ostream {aka std::basic_ostream}' and 'std::vector') I searched in Google about how to solve this problem, I found that I need to overloaded operator <<. But the solution is too difficult for me to understand, because I'm still learning c++. How can I solve this problem? Is there a basic solution to display the return?
1 Answer
0
You can write this line after all the includes: using namespace std;
After that you won't have to write std:: all the time and worry where you need it.