作者shaill (冰封)
看板C_and_CPP
標題[問題] bad_alloc runtime exception
時間Fri Sep 11 18:05:34 2009
請問各位,我遇到一個問題..
就是我有宣告一個
stuct SAbc
{
int a;
float b;
SAbc *next;
};
基本上就是這樣的一個struct,
我在另一個class物件的function中內執行:
SAbc *a = new SAbc();
他就跑出
Microsoft C++ exception: std::bad_alloc at memory location
請問...這是什麼回事阿!!!!!!!!?????
我可以確定的是,我當時的memory還有很多...
所以想請問各位大大,有沒有類似的經驗!?
先謝謝啦!!
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.113.210.70
推 hpeter:struct 換 class 有變嗎?XD 09/11 18:56
推 legendmtg:SAbc *a = new SAbc; 不用加() 09/11 19:04
→ shaill:謝謝各位大大~回樓上:不管有沒有加~我都得到一樣的結果 09/11 20:06
→ shaill:回一樓...也一樣 .__.|| 09/11 20:07