/* */ Click to Join Live Class with Shankar sir Call 9798158723

What is Class scope ?

A class member contains the name of class scope and it is local to its class.Class member accessibility is further controlled by the public, private, and protected keywords. Public or protected members can be accessed only by using the member-selection operators (. or ->) or pointer-to-member operators (.* or ->*).

Q.) Example of Class Variables in C++ .
using namespace std;  
class Operate  
    // declaration of the member function  
    void fun();  
// define the member function outside the class.  
void Operate::fun()   /* return_type Class_Name::function_name */  
cout << " It is the member function of the class. ";  
int main ()  
 // create an object of the class Operate  
Operate op;  
return 0;  

It is the member function of the class.