Horje
can derived class access base class non-static members without object of the base class Code Example
can derived class access base class non-static members without object of the base class
class base
{
public:
    int data;
    void f1()
    {
    
    }
};
class derived : base 
{
public :
     void f()
    {
        base::data = 44; // is this possible
        cout << base::data << endl;
    }
};




Cpp

Related
how to add an element to std::map Code Example how to add an element to std::map Code Example
how to remove special characters from a string Code Example how to remove special characters from a string Code Example
recuva recovery software for pc with crack Code Example recuva recovery software for pc with crack Code Example
reading in lines from a file to a vector c++ Code Example reading in lines from a file to a vector c++ Code Example
how to get euler constant in c++ Code Example how to get euler constant in c++ Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
11