-----------------------------------------------------------
New Message on BDOTNET
-----------------------------------------------------------
From: Sujay
Message 1 in Discussion
Hello Users ,
I am posting an off topic question .
I have an empty class, like below :-
class MyClass
{
// Nothing
};
int main( )
{
MyClass obj;
int nSize = sizeof(obj);
cout << size << endl ;
// The value gets printed as 1
}
Though the class is empty , the sizeof operator returns 1. My
question is WHY ? On the other hand if I declare a int member variable in
the class, sizeof returns the value of the int only.
Any help would be appreciated .
Sujay
Sujay Ghosh
iGATE Global Solutions Ltd.,
( formerly known as Mascot Systems Ltd.),
No.1, Main Road , Jakkasandra ,
Off Sarjapur Road ,
Koramangala Extn .
Bangalore - 560 034
Mail : [EMAIL PROTECTED]
Phone : + 91 - 080 - 552 - 1701 - 06 ( Extn : 5010)
Fax : 91-080-5521704
Mobile : 98454 67789
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/BDotNet/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you received
this message by mistake, please click the "Remove" link below. On the pre-addressed
e-mail message that opens, simply click "Send". Your e-mail address will be deleted
from this group's mailing list.
mailto:[EMAIL PROTECTED]