   Windows error message...again...
  I've gotten the windows error message "<program> has encountered a problem and needs to close..." when I run my linked list program. I have used the commenting technique to narrow the problem down to a set of functions, actually even 1 thing happening in 1 function. However, I can't find a problem with what I'm doing...I know this error means that it's trying to access memory it shouldn't, but I don't see a problem with my pointers or arrays or anything like that...all I know is the message did not come when I commented out the part of reorderPaths() noted in the source. Can anyone find a cause to this problem?relevent parts of QuestionSet.cpp://goes through the list, gets imgPath from each node, and puts them into a//multi-dimensional array, thePaths[][30]void QuestionSet::getAllPaths(char thePaths[][30], int &myCount){  strcpy(thePaths[myCount], imgPath); //"ingPath" is an array in the class  if ( nextQuestionSet )  {    myCount++;    nextQuestionSet->getAllPaths(thePaths, myCount);  }}//takes the paths that have been reordered by reorderPaths and puts them//into a different array in the nodesvoid QuestionSet::insertNewPaths(char thePaths[][30], int &myCount){  strcpy(imgPathNew, thePaths[myCount]);  if ( nextQuestionSet )  {    myCount++;    nextQuestionSet->insertNewPaths(thePaths, myCount);  }}//gets the image paths from all the nodes (using getAllPaths), puts them in//a different order using a key, then puts them back into the list (using insertNewPaths)  void QuestionSet::reorderPaths(int *key){  int numberOfNodes = howMany(); //gets the number of nodes present in the list  char myPaths[numberOfNodes][30]; //the questions from the list  char myPathsReordered[numberOfNodes][30]; //the questions after reordering  int count = 0;  getAllPaths(myPaths, count); //if I comment out this line...  for ( int i=0; i<numberOfNodes; i++ )  {    strcpy(myPathsReordered, myPaths[key]);  } //...through this line the problem stops  count = 0;  insertNewPaths(myPathsReordered, count);} 
Quote: I have used the commenting technique to narrow the problem down to a set of functions,What's wrong with a debugger?  It'll show you exactly where it crashed along with useful information such as the call-stack, arguments passed to functions etc.  Far better than tediously commenting things out till you find the thing causing the crashI notice you're using C++, but you're using C-style strings.  I haven't examined your code enough to work out what's causing the crash, but you're probably over writing some array boundries somewhere while manipulating the strings.  Why don't you just use C++ strings (i.e. std::string)?  It saves a lot of headaches.   ;  A debugger would be just short of absolutely vital at this point in your programming career. You need to learn how to use one for tracking down these kinds of problems.There isn't enough code here to tell if you're overrunning an array or working on an invalid pointer, but I'd suspect your problem is with the key[] array getting sent to reorderPaths().   ;  what debugger would you suggest? I have tried to use the one that came with Dev-C++, but it seems rather complicated, and I could never actually get it to work...do you know either any good tutorials for the Dev-C++ compiler (yes, I've looked...I couldn't find any that made sense), or one that is less complicated or more user-friendly?Thanks!   