I put it
@/// overloading operator<<
ostream& operator<<(ostream& currCout, const MyClass& currObj)
{
currCout << currObj.m_val;
return currCout;
}@
in any cpp file. It's work!
Strangely, before I did about the same, but did not work.