I have the following function static Component* constructComponent(int value) { return (new ComponentChild(value)); }
ComponentChild is a derived class of Component.However, I get told that ComponentChild cannot be converted to Component*. I'm confused here, does new return a heap pointer or not? Are objects automatically assumed to be pointers?