I am working on a maze assignment. We are supposed to read in the text file that contains the maze, which looks like the one below, and convert it to a graph/ grid. I can get it to read in the file, but cant figure out what to do next. Any help would be appreciated. I'm not necessarily looking for code.
This is what I have so far.
Code:
int main(){
FILE *myfile;
char c;
myfile = fopen("maze2.txt", "r+");
if(!myfile){
printf("File not found.");
}
do{
c = fgetc(myfile);
putchar(c);
}
while(c!= EOF);
fclose(myfile);
node_t maze;
return 0;
}