作者Ebergies (火神)
看板C_and_CPP
標題Re: [問題] copy constructor
時間Thu Oct 22 21:35:05 2009
^L:Code:P
class CallMe {
public:
CallMe() {}
CallMe( CallMe me) {}
};
^L:Main:K#@a#2
int main()
{
→ CallMe first;
CallMe second( first);
return 0;
}
^LK#@a#2
class CallMe {
public:
→ CallMe() {}
CallMe( CallMe me) {}
};
^LK#@a#2
int main()
{
CallMe first;
→ CallMe second( first);
return 0;
}
^LK#@a#2
class CallMe {
public:
CallMe() {}
→ CallMe( CallMe me) {}
};
^LK#@a#2
class CallMe {
public:
CallMe() {}
CallMe(
→ CallMe me( first)
) {}
};
^L:Initial:K#@a#1
class CallMe {
public:
CallMe() {}
→ CallMe( CallMe me) {}
};
^LK#@a#1
class CallMe {
public:
CallMe() {}
CallMe(
→ CallMe me( me)
) {}
};
^LG:Initial:,:Initial:,:Initial:,:Initial:,:Initial:,:Initial:,:Initial:,:End:0
^L:End:K#@a#10
Segmentation fault
--
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 59.124.99.126
※ 編輯: Ebergies 來自: 59.124.99.126 (10/22 21:36)
推 james732:高手!! XD 10/22 21:36
→ Ebergies:唉我吃飽太閒 10/22 21:47
→ VictorTom:太屌了....XDDD 10/22 22:13
推 ranshell:超簡潔 讚 10/23 09:34