shortcut access to base class function/variable
-
if the statement "using namespace" could be used to shorten the name to access to a certain function/variable. Is there a similiar method to access to base class functions/variables in inheritance class functions , ie. to remove the front portion "base_class::" from "base_Class::base_class_func"? :confused:
-
if the statement "using namespace" could be used to shorten the name to access to a certain function/variable. Is there a similiar method to access to base class functions/variables in inheritance class functions , ie. to remove the front portion "base_class::" from "base_Class::base_class_func"? :confused:
-
normally you wouldnt need to explicitly qualify the base class variables and functions, unless they are static.... could you post some code?
You are right! I just tried to remove the front portions of it. Before class classOne { public: void functionOne() {} }; class classTwo: public classOne { public: void functionTwo() { classOne::functionOne(); } }; I have removed the classOne:: from the function, and it works perfectly now. I was having some problems implementing class initially, that's why I have kept the front portion. Thanks a million! ;)