Virtual function or virtual method, which one is appropriate? -


i have been many interviews, question interviewers used ask "do know virtual function?" wonder why experienced programmer/developer use function virtual. know.. not functions can virtual, functions part of class/struct can virtual.

so think "function superset , method subset. not functions can methods but, methods functions. therefore appropriate use "virtual method" not "virtual function".

can explain, why of experienced programmer , technical books write use "virtual function" not "virtual method"?

technically methods belong classes , functions ones don't, other things general , common, people end mixing terminology , in end "function" , "method" can both refer 1 thing or other. that's pretty answer question... in end, terminology defined how people use it, not original intended meanings.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -