Please someone can help me to fix these errors that I get when writing this C pr
ID: 3863057 • Letter: P
Question
Please someone can help me to fix these errors that I get when writing this C program?? what this program does is basically to create a maze where a robot is going through a maze from a starting point to an end point.
I am sending below a screenshot of what the (command) windows shows when I compile the program and also I will send screenshotsof the program with the codes. To save time there alredy shows in what line are the erros and in the screenshots of the program shows numbers, so it is easy to follow in which line in the program are the errors in.
the one above is what the (command) windows shows, and the one below is the actual program.
src/maze runner C In function main rc/mazerunner.c: 18: warning implicit declaration of function time rc/mazerunner.c:48 error: 'maze' undeclared (first use in this function) Brc/mazerunner.c: 48: error: (Each undeclared identifier is reported only once rc/mazerunner.c:48 error: for each function it appears in.) rc/mazerunner.c: 65 error: 'x des t' undeclared (first use in this function) er c/maze runner .c: 65: error: vy dest undeclared (first use in this function) src/maze runner .c: 69 warning: main is normally a non-static function src/maze runner. C In function main src/maze runner. C: 85 Warning implicit declaration of function InitMazer' rec/mazerunner.c:98: error: expected declaration or statement at end of input src/maze runner. C In function main rec/mazerunner.c:98: error: expected declaration or statement at end of input make [src/maze runner.o] Error 1 rm2297 corellia runners IExplanation / Answer
In line 48 the two dimensional array which is used for comparing the wall of the maze in function IsWall ();
is not declared anywhere in the program, in the program if you have created the maze make the variable scope visible to other functions as well wherever you are using that variable.
Similarly at line 65, variables named x_dest and y_dest is used but declared nowhere in the program.
'}' is missing at the end for main and an if statement.