c++ - Differences between structs and classes? -


What structures support heritage? I think this is a stupid question, but I do not have much information about it.

What does this type of writing code mean:

  struct A {void f () Cout & lt; & Lt; "Class A" & lt; & Lt; Endl; }}; Struct B: A {Zero F (cout & lt; & Lt; "Class B" & lt; & Lt; Endl; }};  

Structures will also come in private sections, will they not give the encapsulation? What is the main difference between structures and orbits?

Yes structures support all features that classes do.

  • Members with structure are public by default
  • Members of the structure are public by default

  • Comments

    Popular posts from this blog

    sql - dynamically varied number of conditions in the 'where' statement using LINQ -

    asp.net mvc - Dynamically Generated Ajax.BeginForm -

    Debug on symbian -