Click here to Skip to main content
16,007,932 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: LoadLibrary Fails :( Pin
Chris Ulliott28-Jun-04 23:08
Chris Ulliott28-Jun-04 23:08 
GeneralRe: LoadLibrary Fails :( Pin
David Crow28-Jun-04 7:09
David Crow28-Jun-04 7:09 
GeneralRe: LoadLibrary Fails :( Pin
Chris Ulliott28-Jun-04 23:09
Chris Ulliott28-Jun-04 23:09 
GeneralRe: LoadLibrary Fails :( Pin
vladfein28-Jun-04 7:58
vladfein28-Jun-04 7:58 
GeneralRe: LoadLibrary Fails :( Pin
Chris Ulliott28-Jun-04 23:47
Chris Ulliott28-Jun-04 23:47 
Generalsocket problem Pin
iwanttolearnc28-Jun-04 5:10
iwanttolearnc28-Jun-04 5:10 
GeneralRe: socket problem Pin
vcplusplus28-Jun-04 8:38
vcplusplus28-Jun-04 8:38 
GeneralPolymorphism in C++ Pin
gutsyfarid28-Jun-04 2:04
gutsyfarid28-Jun-04 2:04 
Sir,
I am student of Punjab University College of Information Technology, Lahore, Pakistan
I have problem while using Borland C++ v3.1.

Problem:
=========
The size of an object in virtual inheritance increases 2 bytes

Class base
{
public:
int b;
base()
{}
virtual void f() {}
virtual void g() {}
};

Class derive : virtual public base
{
public:
int d;
derive()
{}
virtual void f() {}
virtual void g() {}
};
----------------------

derive d;

cout<<sizeof(d); gives="" 12="" why?

="" *

but="" when="" i="" don’t="" give="" constructor="" in="" derive="" class="" then="" the="" size="" of="" object="" is="" 10,="" because="" there="" will="" be="" no="" 2="" bytes="" extra="" layout.="" please="" help="" me="" out="" about="" finding="" myth="" these="" two="" bytes.
<b="">The object layout in figure is in following URL

OBJECT LAYOUT FIGURE

*/

The object layout where that extra 2 bytes are laid is drawn in atttchment with v-table layout.

Please contact me at!
informfarid@yahoo.com
GeneralRe: Polymorphism in C++ Pin
David Crow28-Jun-04 2:35
David Crow28-Jun-04 2:35 
QuestionFile Save in a SDI Project - What should be saved? Pin
jerry1211a28-Jun-04 1:43
jerry1211a28-Jun-04 1:43 
AnswerRe: File Save in a SDI Project - What should be saved? Pin
David Crow28-Jun-04 2:39
David Crow28-Jun-04 2:39 
GeneralA pixel from another program... Pin
Vladimir Georgiev28-Jun-04 0:56
Vladimir Georgiev28-Jun-04 0:56 
GeneralRe: A pixel from another program... Pin
Maximilien28-Jun-04 2:48
Maximilien28-Jun-04 2:48 
GeneralRe: A pixel from another program... Pin
User 665828-Jun-04 4:13
User 665828-Jun-04 4:13 
GeneralRe: A pixel from another program... Pin
Vladimir Georgiev28-Jun-04 4:27
Vladimir Georgiev28-Jun-04 4:27 
GeneralRe: A pixel from another program... Pin
David Crow28-Jun-04 7:31
David Crow28-Jun-04 7:31 
GeneralRe: A pixel from another program... Pin
Vladimir Georgiev28-Jun-04 7:43
Vladimir Georgiev28-Jun-04 7:43 
GeneralRe: A pixel from another program... Pin
David Crow28-Jun-04 7:52
David Crow28-Jun-04 7:52 
GeneralRe: A pixel from another program... Pin
Marcello28-Jun-04 8:21
Marcello28-Jun-04 8:21 
GeneralRe: A pixel from another program... Pin
David Crow28-Jun-04 8:28
David Crow28-Jun-04 8:28 
GeneralRe: A pixel from another program... Pin
Marcello28-Jun-04 8:58
Marcello28-Jun-04 8:58 
GeneralRe: A pixel from another program... Pin
David Crow28-Jun-04 9:09
David Crow28-Jun-04 9:09 
GeneralRe: A pixel from another program... Pin
Marcello28-Jun-04 8:16
Marcello28-Jun-04 8:16 
GeneralList box control Pin
Pazzuzu28-Jun-04 0:45
Pazzuzu28-Jun-04 0:45 
GeneralRe: List box control Pin
Peter Mares28-Jun-04 1:02
Peter Mares28-Jun-04 1:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.