You are viewing our Forum Archives. To view or take place in current topics click here.
How would I do this?
Posted:

How would I do this?Posted:

Almac14
  • 2 Million
Status: Offline
Joined: Mar 04, 201212Year Member
Posts: 187
Reputation Power: 7
Status: Offline
Joined: Mar 04, 201212Year Member
Posts: 187
Reputation Power: 7
This function will take one dimension of the board array(row) and iterate through it looking for conflitcts, it should return a 0 if there is a conflict, and a 1 if it is all clear.

Not sure what to add for code, as all I have is the source code with printBoard() function done I believe. I can say that #define BOARDSIZE 8 and the function I need to add code to is called:


int checkRow(char board[BOARDSIZE])
{
      return 1;
}
#2. Posted:
-Deano
  • Spooky Poster
Status: Offline
Joined: Aug 19, 201013Year Member
Posts: 5,238
Reputation Power: 532
Status: Offline
Joined: Aug 19, 201013Year Member
Posts: 5,238
Reputation Power: 532
You haven't really given us suitable information, what are the conflicts supposed to be, what characters are being sent in as parameters, etc.
#3. Posted:
Almac14
  • 2 Million
Status: Offline
Joined: Mar 04, 201212Year Member
Posts: 187
Reputation Power: 7
Status: Offline
Joined: Mar 04, 201212Year Member
Posts: 187
Reputation Power: 7
Literally what I said above is what there is for that function. There are 4 other functions:
void printBoard(char [BOARDSIZE][BOARDSIZE])
int checkRow(char[BOARDSIZE])
int check(char board[BOARDSIZE][BOARDSIZE])
void userInput(char[BOARDSIZE][BOARDSIZE])

#define BOARDSIZE 8

and then im given instructions like what I asked above.
#4. Posted:
Xaldin
  • 2 Million
Status: Offline
Joined: Oct 09, 201013Year Member
Posts: 2,358
Reputation Power: 106
Status: Offline
Joined: Oct 09, 201013Year Member
Posts: 2,358
Reputation Power: 106
What is a conflict though?
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.