|
-
December 13th, 2002, 09:43 PM
#1
members of parent object
how can i access the members of parent object?...
ex.
class Cparent
{
public:
int a;
void funtionX();
}
class Cchild
{
public:
void funtionY();
}
void Cparent::functionX()
{
a=0;
Cchild chd;
chd.functionY();
}
void Cchild::functionY()
{
// how can i access "a" from HERE without parse any data
}
NOTE 1: the code may contain errors, but i only want the method for access
NOTE 2: the two classes are separated in two files .cpp files.
*-Unmanarc
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|