Function Name Overloading

Function name overloading is yet another important improvement in the area of program modularization in C++.

Most languages connect each name with a unique object within a scope (block, function, class, file, and program). This is true of type names, names of variables, and names of functions.

In C, there are no nested scopes for functions within other functions, and their names must be unique within the program scope, not just within the file scope. Two function definitions with the same name in a source file is a syntax error. Two function definitions with the same name in two different files is a link error. C does not take into account parameter types or return values. It is only the function name that matters, ...

Get Core C++ A Software Engineering Approach now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.