ok i have a 2d array and i want to trace through it.
The Array is
RDL
DLU
i have an entry point of Row1 Col1 which i think is letter R. On this array R means shift right L is shift left U shift up and D shift Down. I need to write i a function that will trace though the array and print the path and the ending point. Im not sure how to do this but this is what i have. I think it somewhat on the right track. The name of the array is Maze.
if(Maze[StartR][StartC]='U')
{StartR=StartR+1;
cout<<StartR<<StartC;}
else if(Maze[StartR][StartC]='D')
{StartR=StartR-1;
cout<<StartR<<StartC;}
else if(Maze[StartR][StartC]='L')
{StartC=StartC+1;
cout<<StartR<<StartC;}
else if(Maze[StartR][StartC]='R')
{StartC=StartC-1;
cout<<StartR<<StartC;}