[cs13001] default access and access specifiers
Mikhail Nesterenko
mikhail at cs.kent.edu
Mon Oct 22 17:21:23 EDT 2012
CSI students,
This is regarding today's question on classes. The keywords: "public"
and "private" are called access specifiers. There may be multiple
access specifiers inside the class definition. Each one is valid from
the point it is stated till the next one or till the end of the class
definition. The default access is "private".
For example:
class myclass{
// methods and variables declared here are private
public:
// public access
private:
// back to private access
};
Thanks,
--
Mikhail
More information about the cs13001
mailing list