[問題] 奇怪的cout用法
class Month{
int num;
char f,s,t;
Month(char a,char b,char c){
f=a;
s=b;
t=c;
}
outputMonthNumber();
outputMonthName();
};
int main(){
Month m;
m = Month( 'j', 'a', 'n');
m.outputMonthNumber( cout ); cout << " ";
m.outputMonthName(cout); cout << endl;
}
請問有把cout這個字放在function裡的用法嗎
還是說這是老師寫錯了...= =
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 218.165.129.252
推
03/28 23:33, , 1F
03/28 23:33, 1F
→
03/28 23:33, , 2F
03/28 23:33, 2F
→
03/28 23:34, , 3F
03/28 23:34, 3F
推
03/28 23:37, , 4F
03/28 23:37, 4F
推
03/28 23:39, , 5F
03/28 23:39, 5F
→
03/28 23:39, , 6F
03/28 23:39, 6F
→
03/28 23:40, , 7F
03/28 23:40, 7F
推
03/29 01:47, , 8F
03/29 01:47, 8F
→
03/29 02:19, , 9F
03/29 02:19, 9F
推
03/29 03:16, , 10F
03/29 03:16, 10F
→
03/29 04:09, , 11F
03/29 04:09, 11F
推
03/29 18:08, , 12F
03/29 18:08, 12F