Hi
im using switch to access some member functions through object s1 of that class
switch(choice)
{
case 1: s1.Now(); break;
case 2: s1.create(); break;
case 3: s1.display(); break;
case 4: s1.change(); break;}
Is there a way to change/use only a part of a function? For example for case 2 i create objects, but for case 4 i want to modify the created objects in function create() .
Im trying it this way; i can change case 4 to
case 4: s1.create();
to access create() function, but i only want to access the part that does the changing, not the rest of the function. How can i do that?
Or is there any other way? Can a function inherit from another function?