By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,232 Members | 1,593 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,232 IT Pros & Developers. It's quick & easy.

why Turbo C++ Class shows size 1 byte with sizeof operator is used ?

P: 3
when sizeof(classname) operator is use it shows size 1 even if no member is declared inside a class. Can you plz explain me why it is so?
e.g.
class test
{
};

void main()
{
cout << sizeof(test);
}

o/p : 1
Nov 6 '06 #1
Share this Question
Share on Google+
2 Replies


Expert 100+
P: 1,510
have a look at the discussion at URL
http://www.velocityreviews.com/forums/t279653-sizeofobject-is-different-in-ansi-and-unicode.html
Nov 6 '06 #2

P: 3
have a look at the discussion at URL
http://www.velocityreviews.com/forums/t279653-sizeofobject-is-different-in-ansi-and-unicode.html
Thanx a lot for the help, I got the information which I was looking for.
Nov 7 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.