Hi people,
I'm coming from a Java background here, and I've learned that in C++ it is possible to have both objects, and pointers to objects. For example, for a class called Cat:
Cat fluffy; // An object.
Cat *tinkles = new Cat(); // A pointer to an object.
My question, then, is there any disadvantage or advantage to one or the other? In Java, you essentially only have pointers to objects, and that seems to work fine. My C++ book doesn't seem to give a preference one way or the other...
Thanks,
Just