This is what I have in hand as of now:
class classA
{
public:
int classtype;
int dummy;
void * pObj;
};
class classB
{
public:
int classtype;
int dummy;
};
classA iclassA[20];
classB iclassB[20];
int main()
{
iclassA[0].pObj = (void *) &iclassB[0];
iclassB[0].dummy=5;
system("PAUSE");
return 0;
}
Here void * pObj is an attribute of classA that points to an instance of classB namely iclassB[0]. What I would like to know is how I can assign the value of an attribute of the instance iclassB[0] to an attribute of the instance iclassA[0] that holds pObj.
Shall appreciate all input.