錯誤信息:
Line 36: Char 33: runtime error: store to address 0x625000002048 with insufficient space for an object of type 'double' (solution.c)
0x625000002048: note: pointer points here
00 00 f8 ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
^
錯誤原因:
1. malloc格式沒寫對
malloc格式為: (分配類型 *)malloc(分配元素個數 *sizeof(分配類型))
2. 代碼死循環,導致malloc申請的空間被用光(我的是這個原因,找半天錯誤,發現打錯一個變量)