[問題] new and malloc

看板C_and_CPP (C/C++)作者 (靠,為什麼沒考上榜首)時間14年前 (2011/08/15 19:03), 編輯推噓2(206)
留言8則, 4人參與, 最新討論串1/1
在MSDN上看到一段: The malloc function has the disadvantage of being run time dependent The new operator has the disadvantage of being complier dependent and language dependent 為什麼呢? -- posted from android bbs reader on my motorola MB525 https://market.android.com/details?id=com.bbs.reader -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 101.8.59.158

08/15 19:14, , 1F
大概就是要推廣他們家的 CoTaskMemAlloc 函數有多棒
08/15 19:14, 1F

08/15 19:15, , 2F
可以跨 (微軟的) 語言,不限定一定要用 C, C++, 多編譯器
08/15 19:15, 2F

08/15 19:16, , 3F
這些都沒意義,你在 Linux 寫 C++ 始終不會用到 COM
08/15 19:16, 3F

08/15 19:35, , 4F
MSDN是platform dependent...這有好到哪邊嗎= =
08/15 19:35, 4F

08/15 22:13, , 5F
這兩段描述,套到gcc/g++也是一樣的..
08/15 22:13, 5F

08/15 23:22, , 6F
不要太偏向某一邊才不會太偏激, 行中道, 比如JAVA和.NET都
08/15 23:22, 6F

08/15 23:23, , 7F
會不是很好嗎? 理論面都是一樣的, 只是框架內類別名稱不同
08/15 23:23, 7F

08/15 23:23, , 8F
罷了。
08/15 23:23, 8F
文章代碼(AID): #1EIFpc5x (C_and_CPP)
文章代碼(AID): #1EIFpc5x (C_and_CPP)