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:
And I use that by entering the 'variable name' into the map when I call it:
map <string, double> RBT_NUMVALS;
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??
cout << "x = " << RBT_NUMVALS["x"] << endl;
but that didn't seem to work.
map <string, double, double> RBT_NUMVALS;
Thanks in advance