In C++, what is the difference between a method and a function [duplicate]

As far as the C++ standard is concerned, there is no such thing as a “method”. This terminology is used in other OO languages (e.g. Java) to refer to member functions of a class.

In common usage, you’ll find that most people will use “method” and “function” more or less interchangeably, although some people will restrict use of “method” to member functions (as opposed to “free functions” which aren’t members of a class).

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)