【发布时间】:2014-05-03 13:08:17
【问题描述】:
我在 Eclipse 上使用下面的代码,我得到一个错误终止“在抛出 'std::bad_alloc' 的实例后调用什么():std::bad_alloc”。
我有 RectInvoice 类和 Invoice 类。
class Invoice {
public:
//...... other functions.....
private:
string name;
Mat im;
int width;
int height;
vector<RectInvoice*> rectInvoiceVector;
};
我在 Invoice 的方法中使用下面的代码。
// vect : vector<int> *vect;
RectInvoice rect(vect,im,x, y, w ,h);
this->rectInvoiceVector.push_back(&rect);
我想在 eclipse.ini 文件中更改 eclipse 内存。但是我没有授权。我该怎么做?
【问题讨论】:
-
这个问题对我也有帮助
标签: c++ memory-management runtime-error