我在eclipse上使用下面的代码,我得到一个错误终止"在抛出'std :: bad_alloc'的实例后调用what():std :: bad_alloc".
我有RectInvoice类和Invoice类.
class Invoice {
public:
//...... other functions.....
private:
string name;
Mat im;
int width;
int height;
vector<RectInvoice*> rectInvoiceVector;
};
Run Code Online (Sandbox Code Playgroud)
我在Invoice的方法中使用下面的代码.
// vect : vector<int> *vect;
RectInvoice rect(vect,im,x, y, w ,h);
this->rectInvoiceVector.push_back(&rect);
Run Code Online (Sandbox Code Playgroud)
我想在eclipse.ini文件中更改eclipse内存.但我没有授权这个.我怎么能这样做?
我想在我的eclipse项目中使用libxml2.我可以在命令行上使用这个库"
g ++ main.cpp -I/usr/include/libxml2 -lxml2 -o output"
但我不能在eclipse上使用.我添加了C++ Build-> Setting-> GCC C Compiler-> Includes
-I/usr/include/libxml2和我添加C++ Build-> Setting-> GCC C++ Linker-> library -lxml2
但是当我构建我的项目时,我收到错误
libxml/parser.h:15:31:致命错误:libxml/xmlversion.h:没有这样的文件或目录