root/trunk/src/tutorials/examples/in_tutorial/rtti/rtti.d
| Revision 6, 365 bytes (checked in by jcc7, 3 years ago) |
|---|
| Line | |
|---|---|
| 1 | import std.c.stdio; |
| 2 | |
| 3 | class A {} |
| 4 | |
| 5 | int main ( char [] [] args ) |
| 6 | { |
| 7 | A a = new A; |
| 8 | Object o; |
| 9 | o = new Object; |
| 10 | bit b; |
| 11 | |
| 12 | printf("%.*s\n", a.classinfo.name); |
| 13 | printf("%.*s\n", o.classinfo.name); |
| 14 | |
| 15 | /* These aren't allowed... */ |
| 16 | // printf("%.*s\n", b.classinfo.name); |
| 17 | // printf("%.*s\n", b.typeinfo.name); |
| 18 | |
| 19 | return 1; |
| 20 | } |
Note: See TracBrowser for help on using the browser.
