|
-
November 21st, 2008, 07:25 AM
#1
size of enum
Hi,
When I create an enum like this
enum x {aaa,bbb,ccc};
cout<<sizeof(x)<<endl; shows the 4
if I put the enum in a class like this
class abc{
public:
enum a { aaa,bbb,ccc=102,dd};
};
and in the main I Print tha size of the object it should show me 4 again but it is showing 1
I think this is wrong. I am using .NET compiler
plz clarify
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
|