Sorry for disturbing your guys again.
But that's what I did. I made an array of type 'position' to keep track of the queens I placed, like that:
struct position
{
int x,y;
};
Type: Posts; User: Dashing Boy
Sorry for disturbing your guys again.
But that's what I did. I made an array of type 'position' to keep track of the queens I placed, like that:
struct position
{
int x,y;
};
Ooooops........I guess that was the mistake. But still it is not producing the required result after removing that part of code. Here's the result:
Enter Row: 3
Enter Column: 5
-1 ...
To block the path of the user placed queen. Still there's no appropriate solution if I remove that part. .
First of all thanks for your help. By following your advice I wrote this code:
#include "stdafx.h"
#include <iostream>
using namespace std;
int queen[8][8];
bool addQueen(int x, int y)
{
Thanks for your response guys.
tjpanda, I tried what you said but still....the problem is how to remove that particular 1 again if there's no slot for placing a queen after investigating all the...
That's exactly what I initially did.
0: or no queen
1: queen
2: locked path/threatening
When there's no place go back to the previous iteration and removes the queen with aal its fields and...
Yeah, that's what I intended to do. Sorry for not being clear. Actually, the program which I wrote is so messed up now that even I'm having a hard time understanding it.
Now coming to the problem....
i have a homework
my homework is to place the remaining 7 queens pieces from the game of chess
on a chessboard so that no queen piece is threatening another queen on the board after user had placed...
Hi,
I'm having a problem while sorting the values using the selection sort and inserion sort alogos. Please someone tell me where I'm mistaking...?
Here's the code for selection sort:
...
Well I'm asking only for a hint that how could I delete that particular value, not the entire code so that.
Just a lil help will do it. I guess, I'm not asking for anything big.
Waiting for...
Hello,
I have an assignment to make a program which take values in an array then ask the user to delete a particular value.
so far I have made this
#include <stdio.h>
#include <conio.h>...