They are interchangeable.
Some people, on the other hand, prefer calling methods, functions that are part of a class, and functions, free functions.
//function overloading
void foo(int x);
void foo(int x, int y);
//method overloading
class A
{
void foo(int x);
void foo(int x, int y);
};
A method or function is overloaded by changing its signature while preserving its name.
The signature consists of the following:
parameter types names
cv-qualifiers
To overload, just alter the parameters or the CV-qualifiers.
For example, if the method is part of a class, you may override it like follows:
class A
{
void foo(int x);
void foo(int x) const;
void foo(int x, int y);
};
When working with an immutable object, the prototype foo(int x) const will be invoked.