Hey everyone I'm writing a game where the user puts code into a text file and my program reads it in, creates and uses the variables and affects robots on the screen, and so far I've been doing rather well at this...
My one question is how do you create a map that has 2 dimentions by which to access it.
To make one its:
Code:
map <string, double> RBT_NUMVALS;
And I use that by entering the 'variable name' into the map when I call it:
Code:
cout << "x = " << RBT_NUMVALS["x"] << endl;
I'm trying to make it so that the user can create arrays of 'variables' and thus need to allow for more access than just a string, anyone know how to do that??
I tried:
Code:
map <string, double, double> RBT_NUMVALS;
but that didn't seem to work.
Thanks in advance