Since you didn't wrote the code of the "fruits" class, we can not be 100% sure. But the error is quite explaining the problem.
You can not print out a class if you don't overload the
<<
operator within the class.
It is the same as with equality, comparison and other operators.
If you try to do:
if (thefruit[1] == thefruit[2])
{
}
It is going to throw the same error but with
no operator "=="
instead
[edit]
Have a look to following links:
http://www.tutorialspoint.com/cplusplus/cpp_overloading.htm[
^]
http://en.cppreference.com/w/cpp/language/operators[
^]