I am very confused with static functions. Can I override them? If no, then why? I searched web a lot but i am still not clear. Please tell with one example if possible. Thanks a lot.
nitin1
15
Master Poster
Recommended Answers
Jump to PostTo be clear, no, you cannot override static methods. (You can overload them, though.)
The reason is simple: a static method cannot appear in a class's virtual function table, so it is not inherited. In order to call a static method you must know exactly what type of object you …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.