I'm trying to program an array that will store the latitude and longitude of a coordinate.
Is it possible to store the N/S component and degrees in the same array?
1 2 3 4 5 6
constint arraysize = 10;
double firstLongitude[arraysize]={0,0,0,0,0,0,0,0,0,0};
cout << "Enter the longitude of the first coordinate:" << endl;
cin >> firstLongitude[1] >> firstLongitude[2];
cout << firstLongitude[1] << " " << firstLongitude[2] << endl;
In fact, it's acting so weird. Can anyone help & explain?
Enter the longitude of the first coordinate:
N 45.0
0 0
Press any key to continue . . .
Enter the longitude of the first coordinate:
N 45.0
0 0
Press any key to continue . . .
Enter the longitude of the first coordinate:
N 45.0
0 0
Press any key to continue . . .
So I can store int & doubles in the array. But how do I store a char, and not mess up the values afterwards? Thanks!