【发布时间】:2010-10-30 00:58:54
【问题描述】:
这个函数声明给了我错误:
ostream& operator<<(ostream& os, hand& obj);
错误是:
error C2143: syntax error : missing ';' before '&'
error C4430: missing type specifier
error C2065: 'os' : undeclared identifier
error C2065: 'obj' : undeclared identifier
error C2275: 'hand' : illegal use of this type as an expression
see declaration of 'hand'
error C4430: missing type specifier
hand 是我做的一个类,display 是 char* 类型的公共数据成员。
谁能告诉我我做错了什么?
【问题讨论】:
标签: c++ operator-overloading stream ostream