+ 1
C program maze traverser
I'm doing a project in which I need to build a maze traverser that is right handed I don't know where to start. I guess I need to start by reading in the maze by using file processing how would I do that?
1 ответ
+ 1
Reading file is done with two methods:
- a binary file: fopen, fclose, fread and fwrite
- a text file: fopen (but with slightly different parameters), fclose, fread (or fgets, fgetc, fscanf, ...) and fwrite (or fputs, fputc, fprintf, ...)
You should find loooots of examples by searching on Google how to handle files in C
The second part depends on the file itself, how is it written ? What is its format ? And with the answer of those questions you can create an algorithm to read it