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

∙ 14y ago

What else can I help you with?

Related Questions

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


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.


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 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'.


What is the default access specifier in C plus plus?

private


Can you call main in c plus plus?

Of course.


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

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


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++.


What is message passing in c plus plus?

-define class with necessary data member & member function. -create object of that class. -communication.


What is the difference between an attribute and a behavior in c plus plus?

An attribute is a class member variable while a behaviour is a class member method.