my program keeps charshing before it dose anything, ive narrowed the problem down to this section of code.
if(next!=TPartTail) next->Draw();
It should call the Draw function of the object pointed to by next if its not TPartTail, when the program start next gets initilized to TPartTail. I dont understand what could possable be wrong, but if I remove the logical checks for TPartTail then the program runs.
TPartTail is a global variable that only appears in one source file.
its declared as
TPartNode* TPartTail = new TPartNode;
And the default constructor for TPartNode is
TPartNode::TPartNode() {
next = TPartTail;
prev = TPartHead;
}
any thoughts? Need more code/explanation?