[問題] 請問malloc的用法

看板Programming作者時間18年前 (2007/09/21 15:25), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/2 (看更多)
int *ptr; 1. ptr = malloc(sizeof(int*) * size); 2. ptr = (int*)malloc(sizeof(int) * size); 請問一下 這兩種用法在意義上或allocate出來的記憶體 有什麼差別呢? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 218.175.233.220
文章代碼(AID): #16yt7TLT (Programming)
討論串 (同標題文章)
文章代碼(AID): #16yt7TLT (Programming)