Skip to content

Instantly share code, notes, and snippets.

@codec-abc
Created January 4, 2018 14:48
Show Gist options
  • Select an option

  • Save codec-abc/21291a0fd22d06c48557c65c1bc340f3 to your computer and use it in GitHub Desktop.

Select an option

Save codec-abc/21291a0fd22d06c48557c65c1bc340f3 to your computer and use it in GitHub Desktop.
// 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