No, i only have a w in the file, so I don't know what's going on.
Here is the function that outputs it to the file:
Code:
void output_maze(char *maze, int xWidth, int yWidth, FILE *mazeFile)
{
int new_line_counter = 1; //-index tracker
int full_size = xWidth*yWidth - 1; //-full size of array
for (int i=full_size; i>=0; i--)
{
//-if at the end of row, print new line after char
if (new_line_counter%xWidth==0)
{
fprintf(mazeFile, "%c\n", maze[i]);
}
else
{
fprintf(mazeFile, "%c ", maze[i]);
}
new_line_counter++; //-increment the counter
}
}
opening the file:
Code:
FILE *mazeFile = fopen(fileName,"w");