如果我有作爲 typedef Struct b {
int b;
Struct b *next;
}B;
typedef Struct a {
int a;
Struct a *next;
B *link;
}A;
,如果我制定以下這個方案的數據結構.. 我使用雙指針頭名單列表B用於跟蹤A節點之間的所有B節點。 因此,如果我使用realloc向指針提供更多數據,我不會丟失頭部
我用這個代碼,通過這種結構,即時通訊設法使功能來添加項目到這個結構 typedef struct goods{
char *name;
int num;
} goods;
void addWord(char *what, goods *where, int pnr, int *arrsize, int n){
if (pnr >= *arrsize){
我可以讓你添加問題的遊戲功能。我使用realloc來增加內存,所以我可以存儲更多的問題。 腳本: struct Question* AddQuestions(int* amountQuest){
struct Question* questionsLocation = NULL;
int startQuestion = 0;//How many question from be
guys :)我有一個2d動態數組,我需要在每列中找到最大和最小的數字。我必須在我的數組中插入2個新行(最大值和最小值),但似乎我的realloc工作不正常。請告訴我我做錯了什麼以及我應該如何繼續。 int **in(int l,int c);
void out(int l, int c, int **a);
int max_colonne(int l, int c, int **a,int