| 1 |
#include <stdio.h> |
| 2 |
|
| 3 |
struct test_class { |
| 4 |
test_class () { |
| 5 |
m = new char[10]; |
| 6 |
printf("In ctor\n"); |
| 7 |
} |
| 8 |
~test_class () { |
| 9 |
delete m; |
| 10 |
printf("In dtor\n"); |
| 11 |
} |
| 12 |
char * m; |
| 13 |
} g; |
| 14 |
|
| 15 |
int main() |
| 16 |
{ |
| 17 |
printf("In main\n"); |
| 18 |
return 0; |
| 19 |
} |