runtime error: store to address 0x625000002048 with insufficient space for an object of type 'double' (solution.c) 0x625000002048: note: pointer points here


錯誤信息:

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申請的空間被用光(我的是這個原因,找半天錯誤,發現打錯一個變量)


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM