Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inhertitance in structures

Status
Not open for further replies.

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.
 
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top