Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Sub Structure ? ? ? ! ! !
Index -> Programming, C++ -> C++ Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Homer_simpson




PostPosted: Fri Jul 25, 2003 6:52 pm   Post subject: Sub Structure ? ? ? ! ! !

ok i know that classes can have subclasses and u can use virtual to run specific function that specific subclass has... but is there such a thing for structures as well?
Sponsor
Sponsor
Sponsor
sponsor
UBC_Wiskatos




PostPosted: Fri Jul 25, 2003 9:27 pm   Post subject: Re: Sub Structure ? ? ? ! ! !

Homer_simpson wrote:
ok i know that classes can have subclasses and u can use virtual to run specific function that specific subclass has... but is there such a thing for structures as well?


A structure is the same as a class in C++, except that a structure's members default to public, while a class' members default to private. You can use them interchangably if you wish. Also, classes default to inheriting privately, while structures default to inheriting publically.
Display posts from previous:   
   Index -> Programming, C++ -> C++ Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: