for example if i were to write some quick code as below, which should put out the "status" which include the current position of the rover, i have to relay the grid x and grid y to the output in this form:
as opposed to simply map.gridx
which says to me, i cant use map as just a pointer, if i want to always be aware of where i am within the 2d array, i have to search it every time i want to move and compare map[x][y].gridx to a current gridx int variable.
Is this the case or is there some C trickery i can use that i havent yet learnt?
I realise i may not be very clear in my description but i'm not very clear in my head...
Ta v much
void status(int power)
printf(" Mars Rover Monitor\n\n");
printf("Position: (%d, %d)",map.Gridx, map.Gridy);