Instead of calling in two different pointers to new; how would I make an instance where I just need to call one in. Instead of creating sepreate u and p just call one pointer to get both of the virtual methods ,or is something like that takes up to much memory. Here's the code.
Also I am not new to polymorphism or dynamic memory by a long shot. I just wanted to know if I can do something where you only need one pointer to Thisthing and Bringit. This is the way it was taught to me ,but by my small expereince there is always a different way to do something.
So there is pretty much no way of doing it like I said it I knew it. But yeah I actually have defined it by refrence before hand. Thanks anyway @JLBorges
You asked for a way to do it with one pointer and JLBorges showed an example of doing that. Are you asking if there is a way to access both functions through a single object? You can't do that. The reason is that with virtual functions, the function that gets called is basically a property of the object itself.