|
-
April 23rd, 2005, 02:31 PM
#9
Re: structures
 Originally Posted by Andreas Masur
Why would that be?
In C++ there are only two differences between a class and a structure:
- By default, the members of a class are private while the members of a structure are public
- By default, a struct inherits publicly while a class inherits privately
In other words...everything that a class can do, a structure can as well... 
The reason is exactly what you mentioned - in C++ (today) a struct is given all the functionalities of a class - baring defaults.
Given this situation, perhaps, it is best to call a struct being used as a class, a class.
Last edited by Siddhartha; April 23rd, 2005 at 03:57 PM.
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
|