2
0
mirror of https://frontier.innolan.net/github/amigaos-cross-toolchain6.git synced 2024-10-19 10:29:55 +00:00
Files
amigaos-cross-toolchain6/examples/test-ctors.cpp
2016-10-15 11:32:17 +02:00

30 lines
351 B
C++

#include <stdio.h>
#ifdef __A
struct A {
int i;
A(int _i) { i = _i; puts("ctor A"); }
~A() { puts("dtor A"); }
};
A a(10);
#endif
#ifdef __B
struct B {
int i;
B(int _i) { i = _i; puts("ctor B"); }
~B() { puts("dtor B"); }
};
B b(20);
#endif
#if !defined(__A) && !defined(__B)
int main()
{
puts("hello world!");
return 0;
}
#endif