Quote:
Originally Posted by Emufr3ak
Can I have a look at yours Ernst.
|
Here's my main.cpp:
Code:
#include "support/gcc8_c_support.h"
#include <exec/execbase.h>
struct ExecBase * SysBase;
class TestClass {
public:
TestClass(int a);
~TestClass();
void Test();
private:
int a;
};
TestClass::TestClass(int aa) {
KPrintF("In TestClass::TestClass(int)");
a = aa;
}
TestClass::~TestClass() {
KPrintF("In TestClass::~TestClass()");
}
void TestClass::Test() {
KPrintF("In TestClass::Test, a = %ld", a);
}
int main() {
SysBase = *((struct ExecBase * *) 4UL);
KPrintF("In main()");
TestClass test1 = TestClass(1);
test1.Test();
TestClass * test2 = new TestClass(2);
test2->Test();
delete test2;
}