What can I do in order to get this running without using wrapper classes?

class MyClass
{
public:
int x;
int y;
};

void print(void* x)
{
// Here I need to
// know what type x is of
// (int or double or Myclass, or anything...)
}

void main(void)
{
int* x1 = new int(3);

MyClass* x2 = new MyClass();

x2->x = 5;
x2->y = 5;

print(x1);
print(x2);

delete x1;
delete x2;
}