#include <iostream>
class Node {
public:
friend ostream& operator << (ostream& output, const Node& n);
int _val;
//methods
Node();
Node( int );
~Node();
int getVal();
void setVal( int );
};
...
ostream& operator<<(ostream& output, const Node& n) {
output << "NODE::"<< n._val << "\n";
return output; // for multiple << operators.
}
I am using MSVC++2010 Express.
I have googled on this, and saw something about misplaced includes causing this, but I am not sure how to resolve this or what role misplaced includes would play.