acess base class member

Hi
I have one class which looks like following way. can anyone suggest me how can I change base class data member through derived class object(Not creating base
class object).

class base
{
public:
int i;

void fun();
};

class derived : public base
{
public:

int i;
void fun();
};

int main()
{


}
Last edited on
base::i=42;
hmm
Topic archived. No new replies allowed.