image
Feb 3, 2013

what is the public and private in C++?

1
0+
0-
  • Best answer

  • Others answers (1)

  • image
    Feb 3, 2013

    Public variables, are variables that are visible to all classes. Private variables, are variables that are visible only to the class to which they belong. Protected variables, are variables that are visible only to the class to which they belong, and any sub classes. The following table shows the access to members permitted by each modifier. Access Levels Modifier Class Package Subclass World public Y Y Y Y protected Y Y Y N no modifier Y Y N N private Y N N N

    0+
    0-
    Comment
  • image