N notfred Lifer Feb 12, 2001 38,241 4 0 Dec 4, 2001 #26 << Cool... glad you got it working now! >> Now I jsut need to make my FindWumpus function work correctly
<< Cool... glad you got it working now! >> Now I jsut need to make my FindWumpus function work correctly
M Mucman Diamond Member Oct 10, 1999 7,246 1 0 Dec 4, 2001 #27 Here we go again I think the problem is here : if(temp.get_name() == test){ I added the following couts to debug in the FindWumpus method: cout << "temp.get_name() = " << temp.get_name() << " test = " << test << endl; if(temp.get_name() == test){ cout << "test passed!\n"; return CurrentNode->GetWumpus(); } cout << "Could not retreive a Wumpus\n"; return 0; }
Here we go again I think the problem is here : if(temp.get_name() == test){ I added the following couts to debug in the FindWumpus method: cout << "temp.get_name() = " << temp.get_name() << " test = " << test << endl; if(temp.get_name() == test){ cout << "test passed!\n"; return CurrentNode->GetWumpus(); } cout << "Could not retreive a Wumpus\n"; return 0; }
M Mucman Diamond Member Oct 10, 1999 7,246 1 0 Dec 4, 2001 #28 Change the if statement to this : if(strcmp(test, temp.get_name() ) == 0 ) { also add string.h to the include list
Change the if statement to this : if(strcmp(test, temp.get_name() ) == 0 ) { also add string.h to the include list
N notfred Lifer Feb 12, 2001 38,241 4 0 Dec 4, 2001 #29 << Change the if statement to this : if(strcmp(test, temp.get_name() ) == 0 ) { also add string.h to the include list >> thank you oh, and - you are better than me
<< Change the if statement to this : if(strcmp(test, temp.get_name() ) == 0 ) { also add string.h to the include list >> thank you oh, and - you are better than me
M Mucman Diamond Member Oct 10, 1999 7,246 1 0 Dec 4, 2001 #30 LOL... no one is better than anyone... some people just have more experience . One tip : Always put in tons of couts to debug your code... It is tedious but it will actually save you time in the future... good luck.
LOL... no one is better than anyone... some people just have more experience . One tip : Always put in tons of couts to debug your code... It is tedious but it will actually save you time in the future... good luck.