Hi i need help converting my struct to something i can use in C program. I understand that structs are introduces in C++ so i was wondering how i could change that. any help is greatly appreciated :)
#include <iostream>
#include <fstream>
using namespace std;
struct Board
{
int values[81]; //Stores board values
bool isFixedValue[81]; //Keeps track of what numbers can be modified
bool isPossibleValue[81][9]; //decides what values are possible for certain square
int coordinates;
};
int getCoordinates(bool isFixedValue[]);
int getNewValue(Board &board);
bool canChange(Board mainBoard, int coordinates, int value);
bool anyDuplicates(int board[], int coordinates, int value);
void editSquare(int board[], int coordinates, int value);
bool checkPossibles(Board &newBoard);
/*float solve(Board &newBoard);
bool bruteForce(Board &board);*/
bool isSolved(Board board);
void clearBoard(Board &board);
//gets the filename, loads board, and checks to see if opened properly then interacts with the user.
int main(int argc,char *argv[])
{
char fileName[256];
Board mainBoard;
//Get FileName and read board
getFileName(fileName);
if (!getBoard(fileName, mainBoard))
cout << "Error: Unable to open file " << fileName << endl;
//Validate Board and show menu
else
if (validateBoard(mainBoard))
{
displayMenu();
displayBoard(mainBoard);
interact(mainBoard);
}