Jun 30, 2003 #1 priyank Programmer Joined Jun 30, 2003 Messages 1 Location IN can we inherit structures..???? If Yes, then structures and classes become similiar and then why we use classes...not structures.
can we inherit structures..???? If Yes, then structures and classes become similiar and then why we use classes...not structures.
Jun 30, 2003 #2 chipperMDW Programmer Joined Mar 24, 2002 Messages 1,268 Location US Yes. Structure members default to public, class members default to private. In idiomatic usage, a structure implies public data, a class implies private data. There's no functional difference (save initial access priveleges), just an idiomatic one. Upvote 0 Downvote
Yes. Structure members default to public, class members default to private. In idiomatic usage, a structure implies public data, a class implies private data. There's no functional difference (save initial access priveleges), just an idiomatic one.