したらばTOP ■掲示板に戻る■ 全部 1-100 最新50 | メール | |

管理人の独り言(プログラミング関連)

268 ◆rCEzuNnL0g:2008/09/07(日) 11:52:53
多重継承の場合はそんなに単純ではない。
適当にペンと消しゴムのようなクラスを実装して、
ペンと消しゴムが一緒になったクラスを継承で定義してみる。
-----
CPenWithEraser c;
004115CD lea ecx,[ebp-18h]
004115D0 call CPenWithEraser::CPenWithEraser (411019h)
004115D5 mov dword ptr [ebp-4],0
IPen *pp = &c;
004115DC lea eax,[ebp-18h]
004115DF mov dword ptr [ebp-24h],eax
IEraser *pe = &c;
004115E2 lea eax,[ebp-18h]
004115E5 test eax,eax
004115E7 je main+67h (4115F7h)
004115E9 lea ecx,[ebp-18h]
004115EC add ecx,4
004115EF mov dword ptr [ebp-104h],ecx
004115F5 jmp main+71h (411601h)
004115F7 mov dword ptr [ebp-104h],0
00411601 mov edx,dword ptr [ebp-104h]
00411607 mov dword ptr [ebp-30h],edx
pp->Write("書き書き");
0041160A sub esp,20h
0041160D mov ecx,esp
0041160F mov dword ptr [ebp-0FCh],esp
00411615 mov esi,esp
00411617 push offset string "\x8f\x91\x82\xab\x8f\x91\x82\xab" (417800h)
0041161C call dword ptr [__imp_std::basic_string<char,std::char_traits<char>,std::allocator<char> >::basic_string<char,std::char_traits<char>,std::allocator<char> > (41B344h)]
00411622 cmp esi,esp
00411624 call @ILT+495(__RTC_CheckEsp) (4111F4h)
00411629 mov dword ptr [ebp-104h],eax
0041162F mov eax,dword ptr [ebp-24h]
00411632 mov edx,dword ptr [eax]
00411634 mov ecx,dword ptr [ebp-24h]
00411637 mov eax,dword ptr [edx]
00411639 call eax
pe->Erase();
0041163B mov eax,dword ptr [ebp-30h]
0041163E mov edx,dword ptr [eax]
00411640 mov esi,esp
00411642 mov ecx,dword ptr [ebp-30h]
00411645 mov eax,dword ptr [edx]
00411647 call eax
00411649 cmp esi,esp
0041164B call @ILT+495(__RTC_CheckEsp) (4111F4h)
-----


新着レスの表示


名前: E-mail(省略可)

※書き込む際の注意事項はこちら

※画像アップローダーはこちら

(画像を表示できるのは「画像リンクのサムネイル表示」がオンの掲示板に限ります)

掲示板管理者へ連絡 無料レンタル掲示板