批踢踢實業坊
›
看板
Programming
關於我們
聯絡資訊
返回看板
作者
ultrafire ()
看板
Programming
標題
[問題] 請問malloc的用法
時間
Fri Sep 21 15:25:16 2007
int *ptr; 1. ptr = malloc(sizeof(int*) * size); 2. ptr = (int*)malloc(sizeof(int) * size); 請問一下 這兩種用法在意義上或allocate出來的記憶體 有什麼差別呢? --
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 218.175.233.220