Thiago .
/
OOP_Heranca
How to use Inheritance and constructor overloading
Diff: main.cpp
- Revision:
- 0:4731d40a338a
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Aug 05 17:27:08 2015 +0000 @@ -0,0 +1,15 @@ +#include "mbed.h" +#include "Brother.h" +#include "Sister.h" + +int main() { + Sister Thais; + Brother Lucio; + Brother Thiago(20); + + Thais.setAge(23); + + printf("Thais is %i",Thais.getAge()); + printf("Lucio is %i",Lucio.getAge()); + printf("Thiago is %i",Thiago.getAge()); +}