Armenian Knowledge Base  

Go Back   Armenian Knowledge Base > Technical sections > Languages, Compilers, Interpreters > C/C++
Register

Reply
 
LinkBack Thread Tools
Old 10.05.2005, 12:37   #1
4294967296
 
Boyov's Avatar
 
Join Date: 03 2002
Location: /proc/1
Age: 33
Posts: 379
Downloads: 4
Uploads: 0
Reputation: 0 | 0
Default Inheritance and Constructor(z)

Hi,

PHP Code:
class base
{
int a;
public: 
      
base (int arg) { arg;}

PHP Code:
class derived1virtual public base
{
public:
     
derived1 (int arg): base(arg);
}

class 
derived2virtual public base
{
public:
     
derived2 (int arg): base(arg);

PHP Code:
class derived3: public derived1, public derived2
{
public:
  
derived3(int arg): derived1(arg),derived2(arg);

Is the declaration of derived3 constructor right ?

Thanks in advance
Reply With Quote
Old 25.05.2005, 20:32   #2
Грустно...
 
Agregat's Avatar
 
Join Date: 08 2002
Location: Там, где всегда идут дожди
Age: 35
Posts: 21,717
Downloads: 2
Uploads: 0
Reputation: 250 | 7
Default

конечно нет. отсутствует тело конструктора.
Reply With Quote
Reply

Thread Tools


На правах рекламы:
реклама

All times are GMT. The time now is 02:49.


Powered by vBulletin® Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.