Jun 30, 2003 #1 priyank Programmer Jun 30, 2003 1 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 Mar 24, 2002 1,268 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.