Région de recherche :

Date :

https://stackoverflow.com › questions › 479207

How to achieve function overloading in C? - Stack Overflow

An object-oriented way to emulate function overloading in C that doesn't rely on using preprocessor macros consists of creating a struct for each parameter list that you want your function to accept, and making them all "inherit" from the same parent struct.

https://www.geeksforgeeks.org › does-c-support-function-overloading

Does C support function overloading? - GeeksforGeeks

Function overloading is a feature of a programming language that allows one to have many functions with same name but with different signatures. This feature is present in most of the Object Oriented Languages such as C++ and Java.

https://fr.wikipedia.org › wiki › Surcharge_de_fonction

Surcharge de fonction — Wikipédia

La surcharge de fonction (également connue sous le nom de surdéfinition, polymorphisme ad hoc ou overloading en anglais) est une possibilité offerte par certains langages de programmation de définir plusieurs fonctions ou méthodes de même nom, mais qui diffèrent par le nombre ou le type des paramètres effectifs.

https://www.geeksforgeeks.org › function-overloading-in-programming

Function Overloading in Programming - GeeksforGeeks

Function overloading is a powerful feature in programming that enhances code readability and maintainability. It allows the same operation to be performed on different types of data by defining multiple functions with the same name but different parameters. This makes the code more flexible and reusable. R.

Function Overloading in Programming - GeeksforGeeks

https://learn.microsoft.com › fr-fr › cpp › cpp › operator-overloading

Surcharge d'opérateur | Microsoft Learn

Les opérateurs surchargés sont implémentés en tant que fonctions. Le nom d’un opérateur surchargé est operator x, où x est l’opérateur tel qu’il apparaît dans le tableau suivant. Par exemple, pour surcharger l’opérateur d’addition, vous définissez une fonction appelée operator+.

https://web.stanford.edu › ... › cs106l › cs106l.1162 › course-reader › Ch10_OperatorOverloading.pdf

Chapter 10: Operator Overloading - Stanford University

Operator overloading is ubiquitous in professional C++ code and, used correctly, can make your programs more concise, more readable, and more template-friendly. There are two overarching purposes of operator overloading. First, operator overloading enables your custom classes to act like primitive types.

https://eng.libretexts.org › Courses › Delta_College › C___Programming_I_(McClanahan) › 14...

14.2: Overload a Function - Engineering LibreTexts

Function overloading is a feature in C++ where two or more functions can have the same name but different parameters. When a function name is overloaded with different jobs it is called Function Overloading.

http://locklessinc.com › articles › overloading

Overloading Functions in C - Lockless Inc

Various parts of the C and POSIX standards require overloaded versions of C functions to exist. The simplest of these is the definition of the open() function. This function takes two arguments, the first of which describes the path of the file to open, and the second a set of flags describing exactly how to open the file.

https://en.cppreference.com › book › intro › function_overloading

Function Overloading - cppreference.com

If the arguments of two functions differ in number or type it is valid for them to share a name. Run this code. #include <iostream> void function (int n) { std::cout << "function(int " << n << ");\n"; } void function (double d) { std::cout << "function(double " << d << ");\n"; } int main () {. function (3);

https://en.cppreference.com › w › cpp › language › operators

operator overloading - cppreference.com

The overload of operator -> must either return a raw pointer, or return an object (by reference or by value) for which operator -> is in turn overloaded. The overloads of operators && and || lose short-circuit evaluation.

surcharge
Ensemble de fonctions de même nom, en programmation logicielle

La surcharge de fonction est une possibilité offerte par certains langages de programmation de définir plusieurs fonctions ou méthodes de même nom, mais qui diffèrent par le nombre ou le type des paramètres effectifs. Le polymorphisme ad hoc ne doit pas être confondu avec le polymorphisme d'inclusion des langages à objets, permis par l'héritage de classe et la redéfinition de méthode.