difference between class B and Class C

P

Pallav singh

what is the difference between class B and Class C w.r.t. void func( )
{ }


Class A{
Public :
Virtual void func( ){ }
}

Class B : public A{
Public :
Virtual void func( ){ }
}

Class C : public A{
Public :
void func( ){ }
}
 
A

Alf P. Steinbach

* Pallav singh:
what is the difference between class B and Class C w.r.t. void func( )
{ }


Class A{
Public :
Virtual void func( ){ }
}

Class B : public A{
Public :
Virtual void func( ){ }
}

Class C : public A{
Public :
void func( ){ }
}

This looks like a homework assignment.

Since the code contains numerous typos you haven't tried this.

The best way to proceed is to try it.


Cheers & hth.,

- Alf
 
P

Pallav singh

* Pallav singh:







This looks like a homework assignment.

Since the code contains numerous typos you haven't tried this.

The best way to proceed is to try it.

Cheers & hth.,

- Alf

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+

Is is something related to Sharing / Non-sharing of VTBL ?
 
R

red floyd

Pallav said:
[redacted]
Is is something related to Sharing / Non-sharing of VTBL ?

A vtbl is something you should never be concerned about directly.
It's an implementation detail at best. Since the Standard doesn't
require a vtbl, an implementation is free not to provide one.

As has been mentioned before, I (and others) can imagine implementations
of varying quality which provide no vtbl at all.
 
R

red floyd

red said:
Pallav said:
[redacted]
Is is something related to Sharing / Non-sharing of VTBL ?

A vtbl is something you should never be concerned about directly.
It's an implementation detail at best. Since the Standard doesn't
require a vtbl, an implementation is free not to provide one.

As has been mentioned before, I (and others) can imagine implementations
of varying quality which provide no vtbl at all.

Correction. A vtbl is something you should never be concerned about
directly, unless you are writing a compiler.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,968
Messages
2,570,152
Members
46,697
Latest member
AugustNabo

Latest Threads

Top