I have a problem and I don't know the solution for it, need you help! Thank you in advance!
Here my class (class is copied not completely)
#ifndef _CGRAPH_H_
#define _CGRAPH_H_
class Cgraph{
typedef std::list<int> vlist;
typedef std::map<int, int > vidmap;
typedef std::map<int, std::string > vutfmap;
typedef std::map<int, vlist > vmap;
typedef std::map<int, vlist >::iterator vmap_it;
int frequency;
private:
vidmap vertices;
vutfmap utf;
vmap wattackedges; // label 0
vmap battackedges; // label 1
vmap defendedges_label2;
vmap defendedges_label3;
vmap bdefendedges_label2;
vmap bdefendedges_label3;
std::string eLine(int, int, int);
std::string vLine(int, int);
public:
Cgraph(){
};
~Cgraph(){ delete &vertices;
delete &utf; delete &wattackedges; delete &battackedges;
delete &defendedges_label2; delete &defendedges_label3;
delete &bdefendedges_label2; delete &bdefendedges_label3;};
in the main methode I do following
Cgraph *graph = new Cgraph();
delete graph;
and I get this error report
*** Error in `./chess': double free or corruption (out): 0x00007ffffebb1340 ***
Aborted (core dumped)