t/samples/hello_world/cpp/main.cc
raw| 1 | #include "hello_world.h" |
| 2 | |
| 3 | int main() { |
| 4 | HelloWorld hello1; |
| 5 | HelloWorld hello2; |
| 6 | |
| 7 | hello1.say(); |
| 8 | hello2.say(); |
| 9 | |
| 10 | // even if we don't need to destroy these objects explicitly, we call |
| 11 | // destroy() to make this similar to the C code |
| 12 | hello1.destroy(); |
| 13 | hello2.destroy(); |
| 14 | |
| 15 | return 0; |
| 16 | } |
| 17 |