answersLogoWhite

0

A private member can only be accessed from within a method of the class.

(Not 100% certain what the question means. If this answer is not sufficient, please restate the question, giving more details as to what is being asked.)

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

What is friendly in c plus plus?

The keyword "friend" allows a function or variable to have access to a protected member inside a class.


What is member fusion in c plus plus?

If you are asking about member functions. When we declare a function inside a class then that function becomes member function of that class and this function can access the whole class


Is there anything similar between C and C plus plus with reference to data hiding?

No. Data hiding is a feature of object oriented programming. C does not support OOP, and therefore has no private member access. All members are public in C.


What is a method in c plus plus?

In C++, methods are simply class member functions.


What is the default access specifier in C plus plus?

private


What are the access control specifiers used in c plus plus?

The access control specifiers in C++ are...public - to denote that the member is accessible from any in scope codeprivate - to denote that the member is accessible only from within the containing classprotected - the same as private, except that derived classes are includedPrivate is the default for a class type object, while public is the default for a structure type object.


What is the only function all C plus plus programs must contain?

Every C plus plus program that is a main program must have the function 'main'.


Can you call main in c plus plus?

Of course.


Define protected access modifire in c plus plus?

The access privileges in c++ are 1.public 2.private 3.protected and by default its private


What are the main differences between Java and C plus plus?

the difference is that c plus is better because you get big grades


Are the private access specifiers in Java and C plus plus the same?

No.In Java, the private access modifier restricts member access to the class in which the member is declared. But in C++, private members are also accessible to friends of the class in which they are declared. The rough equivalent in Java would be package private access.Not that Java doesn't have access specifiers, it has access modifiers. When no modifier is specified, default access is implied, which is package private for classes and public for interfaces.


Why functions are not used in c plus plus?

Of course they are used. Both stand-alone and class-member functions are used in C++.