Q:

What, if any, are the constraints on where and how often an access specifier may appear inside a class definition? What kinds of members should be defined after a public specifier

0

What, if any, are the constraints on where and how often an access specifier may appear inside a class definition? What kinds of members should be defined after a public specifier? What kinds should be private?

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

There is no constraint on where and how often an access specifier may appear inside a class definition. A class may contain zero or more access specifiers, each kind of access specifiers can appears multiple times. There is no constraint on the sequence of access specifiers too.

The constructors and member functions that are part of the interface should be defined after a `public` specifier.

The data members and member functions that are part of the implementation should be defined after a `private` specifier.

 

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now