c++ - Is it good programming to call a function in a constructor of the same class? -
i wondering if programming call function constructor? example:
class foo{ foo(){ function1(); } void function1(){ } };
this 2 part answer. technical point of view, sure it's fine, long it's not virtual function.
from conceptual point of view, depends function does. if initialisation, that's constructor suppose doing. if more, , function purpose outside of , being called elsewhere also, yeah, can thing.
Comments
Post a Comment