I want to disign a class, which can include a reference of a instance. But the class of this instance is not confirm. In java I can use "object" class, because "object" class is father class of all class. for example
class XX{
...
...
private object YY;
...
public void setYY(object y){YY = y}
public object getYY(){return YY}
}
use setYY I can give XX a reference of a instance, and use getYY to receive it. I dont need care of the class of this instance, because object is "TOP-Father-class".
But in C++ how can I do that?:@