Why can\'t a c++ class have same name for a function and a data member?
class demo{ public: int size(); private: int size; }; in
because if you use size in your class somewhere then the compiler does not know what to do. It can be either the int-data-member or it can be the function-pointer. So the compiler is not able to seperate both kind
size