Files
T2-start-2025/HC/main.HC
Rens Pastoor 11b391b8a1 sync
2025-05-27 22:41:46 +02:00

26 lines
318 B
HolyC

class SomethingWithAnAge
{
I64 age;
};
class Person : SomethingWithAnAge
{
U8 name[1<<5];
};
U0 ExampleFunction(U0)
{
Person *p = MAlloc(sizeof(Person));
MemCpy(p->name,"Bob",3);
p->age = 0;
while (p->age < 42) {
p->age++;
}
"name: %s, age: %d\n",p->name,p->age;
Free(p);
}
ExampleFunction;