これを行う方法がまったくわからないため、現在コードはありません。自分で、各下位レベルの構造体に必要なバイト数を計算して、それにmallocすることはできますか?それは本当にひどいコーディングですね。これが私が一緒にマッシュしようとしている2つの構造体です:
struct property {
int d;
char name [111]; // I just malloc this like I would a normal array, right?
char descr [1025]; // Ditto.
}
struct category {
int d [413]; // The d's of all the child structs sorted highest to lowest.
char name [111];
struct property property [413]; // This. How do I allocate this?
}</code>
私はしなければなりませstruct property* property = (struct property*) malloc(sizeof(struct property) * 413);
んか?内のアレイのmallocはそのまま残りますか?構造体のmallocは一般的にどのように動作しますか?