I am trying to print a list in C++.
My code is as follows:
void MovieFunctions::printMovieList(list<Movie> movies)
{
for (Movie m: movies)
{
cout << m << endl;
}
}
I am getting this error for the cout << m << endl
line:
cannot convert 'm' (type 'Movie') to type 'const unsigned char*'
What's going wrong?