![]() |
Модераторы: Daevaorn |
![]() ![]() ![]() |
|
xlat |
|
|||
Unregistered |
Question in English:
Please tell, how the C++ objects are represented in the memory. Please, draw scheme of situation of different parts of object instance (fields and VMT-pointer) of class CDerived (see the code below) in the memory. If this will not be any trouble, please, send the answer to [email protected] class CBase { public: CBase() {;} virtual void Do_smth() {printf("Inside the parent''s do something.\n");} }; class CDerived: public CBase { public: CDerived() {;} virtual void Do_smth() {printf("Inside the child''s do something.\n");} virtual void Do_something_more() {printf("Doing something more\n");} }; void main() { class CDerived * the_object = new CDerived; } Question in russian: Пожалуйста расскажите, как C++ объекты представляются в памяти. Нарисуйте схемку размещения частей объекта (полей и указателей на ТВМ) класса CDerived (код смотрите ниже). Если это не составит проблему, ответ пришлите на [email protected] class CBase { public: CBase() {;} virtual void Do_smth() {printf("Inside the parent''s do something.\n");} }; class CDerived: public CBase { public: CDerived() {;} virtual void Do_smth() {printf("Inside the child''s do something.\n");} virtual void Do_something_more() {printf("Doing something more\n");} }; void main() { class CDerived * the_object = new CDerived; } |
|||
|
||||
![]() ![]() ![]() |
Правила форума "С++:Общие вопросы" | |
|
Добро пожаловать!
Если Вам понравилась атмосфера форума, заходите к нам чаще! С уважением, Earnest Daevaorn |
1 Пользователей читают эту тему (1 Гостей и 0 Скрытых Пользователей) | |
0 Пользователей: | |
« Предыдущая тема | C/C++: Общие вопросы | Следующая тема » |
|
По вопросам размещения рекламы пишите на vladimir(sobaka)vingrad.ru
Отказ от ответственности Powered by Invision Power Board(R) 1.3 © 2003 IPS, Inc. |