看板 NDHU-phy95 關於我們 聯絡資訊
※ [本文轉錄自 sex 看板] 作者: PPTT0205 (不反王建民 反無腦王迷) 看板: sex 標題: Re: 笑死我了 時間: Sun Jan 14 00:37:42 2007 // This is a hpp file #ifndef BEAUTYGIRL_H #define BEAUTYGIRL_H class 正妹{ private: int 告白者; public: void 被告白(int); void 被帥哥追求(); void 被宅宅追求(); }; #endif ____________________________________________________ // #include <iostream.h> #include <stdlib.h> #include "beautygirl.h" void beautygirl::被告白(int man) { 告白者=man; if(告白者==多金帥哥) { 被帥哥追求(); } else { 被宅宅追求(); } } void beautygirl::被帥哥追求() { int 裝曖昧=10,拒絕=10,帥哥告白 答應=10; while(裝曖昧>2) { 拒絕--; 裝曖昧--; } 帥哥告白=答應; cout<<"被帥哥帶上床"<<endl; } void beautygirl::被宅男追求() { cout<<"你是個好人"<<endl; } void main() { int boy; beautygirl beauty; cin>>boy; //輸入是宅男還是帥哥 beauty.被告白(b); system("pause"); return 0; } -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 59.113.188.75
kim:來個組語吧! 01/14 00:38
ScottProctor:一整個宅味 :( 01/14 00:39
sweslo17:歐歐終於來了!!! 01/14 00:39
a127n:身為社會組的我 完全看不懂 01/14 00:39
EASY0726:XD !! 01/14 00:40
cacaliang:return 0; 01/14 00:39
※ 編輯: PPTT0205 來自: 59.113.188.75 (01/14 00:41)
sweslo17:可是他用void main()耶...不用return吧..... 01/14 00:41
hideho:身為資管的我 看懂了怎辦 >< 推return 0; 01/14 00:41
caseypie:不用prototype嗎?? 01/14 00:41
atrox:這就是所謂的工學院宅宅嗎 01/14 00:42
PPTT0205:看看有沒有人能寫出繼承的類別 01/14 00:42
cacaliang:sweslo17 對~~~我非資工亂推被抓包XD 01/14 00:42
-- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.231.202.200