Created
January 4, 2018 14:48
-
-
Save codec-abc/21291a0fd22d06c48557c65c1bc340f3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Example program | |
| #include <iostream> | |
| #include <string> | |
| class type_de_base {}; | |
| class type_derive : public type_de_base {}; | |
| void fonctionALaCon(type_de_base& a) | |
| { | |
| std::cout << "ouf" << std::endl; | |
| } | |
| void whaouJePeuxFaireAutreChoseAvec(type_derive& a) | |
| { | |
| std::cout << "ouf2" << std::endl; | |
| } | |
| int main() | |
| { | |
| type_derive t; | |
| fonctionALaCon(t); | |
| whaouJePeuxFaireAutreChoseAvec(t); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment