Does creating a new instance of a class make new instances of every method within the class?class example{ public: int x; void dosomething(){ x++; } };
would this make multiple instances of the 'dosomthing' function everytime a new instance of the class is created, or would it act like the code below.class example{ int x; } void dosomething_not_in_class(example* e){ e->x++; }