What's the difference between the following statements in C++ and the proper situations in which one would be used over the others?
Base *obj = new Derived();
Derived *obj = new Base();
Derived *obj = new Derived();
Does it affect the way you would call a method? (i.e. obj->someMethod() )? Let's say the method only existed in the derived class. How does that change things?
Note: I will be away from a computer for a while so I won't be able to respond to posts until tomorrow :-)