hi!
I have a class same as below:
class sample{
friend ostream& operator<<(ostream &ostr,sample p);
private:
//:
//:
public:
//:
//:
};
//---------------------------------------------------
ostream& operator<<(ostream &ostr,sample p){
//:
//:
return ostr;
}
While the compiler get to line(***) make failed with this error report:
type name expected! ( but I define the "sample" type!!)
:?: do you know ---> why this error happened??
tnx.