This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
in202:seance_3:td_3:part_iv [2021/04/07 15:07] bmonsuez [Question n° 1] |
in202:seance_3:td_3:part_iv [2022/11/18 10:46] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== La surcharge d'opérateurs ====== | ====== La surcharge d'opérateurs ====== | ||
+ | |||
+ | [[..:td_3|Sujet complet]] | ||
===== Question n° 1 ==== | ===== Question n° 1 ==== | ||
Line 99: | Line 101: | ||
bool operator != (const rational&) const; | bool operator != (const rational&) const; | ||
}; | }; | ||
+ | </code> | ||
+ | |||
+ | ==== Code présenté pendant le cours ==== | ||
+ | |||
+ | {{https://perso.ensta-paris.fr/~bmonsuez/Media/code/in202/2021/td3/part4/part4.cpp|''part4.cpp''}} Fichier principal contient les fonctions de test et le main. | ||
+ | |||
+ | {{https://perso.ensta-paris.fr/~bmonsuez/Media/code/in202/2021/td3/part4/rational.h|''rational.h''}} Définition de la classe des nombres rationnels. | ||
+ | |||
+ | ===== Liens vers les éléments syntaxiques et ressources externes ===== | ||
+ | |||
+ | [[cpp:syntax:operator:overload|La surcharge d'opérateurs en C++]] | ||
+ | |||
+ | |||
+ | ===== Navigation ===== | ||
+ | |||
+ | [[.:part_iii|Troisième partie]] | ||
+ | |||