March 5th, 2013, 10:58 AM
When I convert from stack to queue (.top to .front) the program does not work correctly. It always displays the message that there is no solution to the pattern inputed by the user.
March 5th, 2013, 06:06 AM
/* Sudoku solver using dept-first search*/
#include <iostream>
#include <stack>
using namespace std;
struct valpos //structure which carries information about the position of the...
February 6th, 2013, 09:51 AM
Thank you Paul. I will switch to string and see what happens. I appreciate your help
February 6th, 2013, 09:21 AM
What you say is perfectly logical. I implemented the algorithm in a simple program and it works just fine. When I implement it in the code above with the same values as in the simple program it...
February 6th, 2013, 09:11 AM
February 6th, 2013, 09:05 AM
I have checked it over and over again. The moment it checks the "if" statement, it goes immediately to the "break" statement (despite the condition). That is why I posted this problem here, because I...
February 6th, 2013, 08:52 AM
You can try and implement the code yourself. It always evaluates to false. I even tried another form of shell sort algorithm and with this new form it evaluates to true.
Here is the second algorithm...
February 6th, 2013, 08:28 AM
I have been doing that, but I dont see any problems
February 6th, 2013, 08:03 AM
Thank you for your reply Paul.
I am sorry for posting my question int the wrong question. I have tried to debug my program and the problem is that the "if" statement in the sort algorithm is always...
February 6th, 2013, 07:29 AM
Paul thank you for your reply. I am sorry for posting my question on a Visual c++ forum. I corrected what you recommend and yes I did use the Visual c++ debugger. The problem is that the if statement...
February 6th, 2013, 04:43 AM
#include <iostream>
using namespace std;
class CD
{
public:
static const int num = 100;
char publisher[num], title[num], location[num];
int year;
public: