inheritance - How can I call a masked function in C++? -
Assume that I have this C ++ code:
zero example function ( ) {// # 1 cot and lt; & Lt; "I want to call the function." & Lt; & Lt; Endl; } Class ExampleParent {// I have no control over the public of this class: zero example function () {// # 2 cout & lt; & Lt; "I do not want to call the function." & Lt; & Lt; Endl; } // other stuff}; Class examples: Groups: Public for example {Public: My job is zero () (example) function (); // How to get # 1? }};
I have a succession from parent
class to customize some of the functionality in the frame. However, parent
class global < Code> exampleFunction is the one I want to call. Is there a way I can call it with myFunction
?
(The Do the following: If you include To avoid these problems, keep everything in the name space, And by using the global time
function
: exampleFunction ()
::
# & lt; ctime & gt;
, you name it as a std
: namespace.
Comments
Post a Comment