Name: Anonymous 2011-04-20 12:30
ITT: How you decide the amount of elements in an array in C++ with only a pointer to the array. I bet you can't do it.
struct hax {
size_t len;
void *data[];
};
struct hax *hax_myanus(size_t len)
{
struct hax *haxed = malloc(sizeof(struct hax) + len * sizeof(void *));
if (haxed)
haxed->len = len;
return haxed;
}