I don't know what I am doing, but I would like someone to help me on this.
I am trying to build a default constructor by using the initializer list, and I am getting this error.
HEAP CORRUPTION DETECTED: after Normal block(#126) at 0x003C5060. CRT detected that the application wrote to memory after end of heap buffer.
I believe the error could be on these following modules.
Code:class list { public: ... ... private: struct node { // constructor node(const winery& winery); winery item; node * nextByName; node * nextByRating; }; node * headByName; node * headByRating;But I'd rather send you guys the entire code so that I can avoid any confusions, and for you to test it and know what I'm talking about.Code://constructor list::list() : headByName(NULL), headByRating(NULL), myHead(NULL), myTraverser(NULL) { } //destructor list::~list() { delete headByName; headByName = NULL; delete headByRating; headByRating = NULL; delete myHead; myHead = NULL; delete myTraverser; myTraverser = NULL; }
lab1.zip - File Shared from Box.net - Free Online File Storage



LinkBack URL
About LinkBacks


