array value

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
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include <iostream>
#include <cmath>
#include <string>

using namespace 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;
}
Topic archived. No new replies allowed.