cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
acess base class member
acess base class member
May 22, 2011 at 5:39pm UTC
agoswami
(135)
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
May 22, 2011 at 5:47pm UTC
May 22, 2011 at 5:55pm UTC
Athar
(4466)
base::i=42;
May 22, 2011 at 5:58pm UTC
agoswami
(135)
hmm
Topic archived. No new replies allowed.