I am trying to figure out a way to fix this error for hours and sadly I haven't found any question asked here that would find me a solution. here is my code:
std::ostream &operator<<(std::ostream &os, Ringnode &node)
{
return os << "ringnode(age: " << node.oldage
<< ", description: " << node.des
<< ", data: " << node.symdata << ")";
}
des and symdata are string private members in class ringnode but oldage is an integer. The error i am getting is the following: binary 'operator' : no operator found which takes a right-hand operand of type 'type' (or there is no acceptable conversion).
Aucun commentaire:
Enregistrer un commentaire