討論串[問題] 這樣malloc為什麼錯..?
共 2 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者loveme00835 (最愛朴素妍)時間15年前 (2010/10/05 01:59), 編輯資訊
0
0
0
內容預覽:
// 更正 : com 配置 x 個指向comunity型態變數的指標. com = (comunity **)malloc(x * sizeof(comunity*));. ↓之前配置了 x 個指標, 你這裡配 y 條記憶體給他? // 更正 : 迴圈執行次數為 x . for(i = 0;
(還有1627個字)

推噓4(4推 0噓 5→)留言9則,0人參與, 最新作者hubuki (瓶子)時間15年前 (2010/10/05 01:11), 編輯資訊
0
0
0
內容預覽:
#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
下一頁
尾頁