Parts of this answer is lifted from this stack overflow question.
Pointer and references allow for late binding/runtime polymorphism, while objects will cause object slicing (see @François Andrieux Comment).
What does this object slicing result in: If you use the objects directly you will lose information and maybe get the wrong methods called, even if you use virtual methods.
Here is an example:
#include <iostream>
using namespace std;
class A
{
public : virtual void print(void)
{
cout<< "A::print()"<<endl;
}
};
class B : public A
{
public : virtual void print(void)
{
cout<<"B::print()"<<endl;
}
};
int main(void)
{
A a;
B b;
A& ref = b;
a=b;
a.print();
ref.print();
return 0;
}
Class B derives from A. A a = b; will lead to Class As print method being called, while using a reference (or pointer) would lead to Class Bs method being called (correct class is evaluated at runtime).
Your comments "how to make this" indicate to me that you are trying to solve a concrete problem. Could you state your exact problem instead of this? Making this work might not be the correct solution to your problem.
Concerning downcasting: As far as I know, you should only ever downcast if you have a base class pointer to a derived class object and you need to perform derived class methods on this and then the answer is dynamic_cast.