basic details of program your stranded in a desert quadrant 1 positive x and y, you enter a series of compass directions ie NSEESNEW these are stored into an array and you iether make it to water and survive or die. the number of directions is specified by a global constant i the the array is terminated by a setinal "null character" i will include my program thus far but is far from complete. my question is do i just asign the null character to the last spot in the array? and if so how would i do this? thank you
#include <iostream>
#include <cmath>
#include <string>
usingnamespace std;
//variables_______________________________________________
int Death(36); // time limit
int x(0),y(0); // x and y starting coordinate
string path; // the path you will follow
// arrays_________________________________________________
string path[DEATH]; // where the path will be stored
// Follow Path Function___________________________________
void followPath(int X,int Y,string PATH[DEATH])
{
while (X>0 || Y>0)
{
for (i=0;i<=DEATH;i++){
if(
}
}
//main program_____________________________________________
int main()
{
// program introduction_________________________________________________
cout << "you are lost in the desert and need to find water! " << endl;
cout << " Enter your starting location, e.g. x y " << endl;
cin >> x; // enter initial x coordinate
cin >> y; // enter initial y coordinate
cout << "Enter the path you will attempt to get to water " << endl;
cout << "e.g. EENSWWES " << endl;
cin >> path; // enter the path you will take
// Call Follow Path Function
return 0;
}