討論串[問題] 這樣malloc為什麼錯..?
共 2 篇文章
首頁
上一頁
1
下一頁
尾頁
內容預覽:
// 更正 : 為 com 配置 x 個指向comunity型態變數的指標. com = (comunity **)malloc(x * sizeof(comunity*));. ↓之前配置了 x 個指標, 你這裡配 y 條記憶體給他? // 更正 : 迴圈執行次數為 x 次. for(i = 0;
(還有1627個字)
內容預覽:
#include<stdio.h>. #include<stdlib.h>. typedef struct. {. int comunityx;. int comunityy;. int x;. int y;. char type;. int year;. } robot;. typedef str
(還有976個字)
首頁
上一頁
1
下一頁
尾頁