|
-
June 22nd, 1999, 02:20 AM
#1
MEMORY ALLOCATION
please answer me this question:
how is the memory allocated for this:
class A
{
int a;
int b;
float c;
void finc();
virtual func1();
}
A *ptr = new A
-
June 22nd, 1999, 03:49 AM
#2
Re: MEMORY ALLOCATION
if you wondering that
sizeof(A) is bigger than sizeof(a)+sizeof(b)+sizeof(c)
it is because virtual-table added to structure
but if is at start or end and how are real sizes of items and whole strucure it depends on compiler, os, no/debug
maybe this helps you
t!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|