I can't seem to make the map template work for me.
//#include "PrecedenceXY.h"
#include <map>
#include <string>
using namespace std;
map<string, int> normalXPrecedence;
map<string, int> normalYPrecedence;
normalXPrecedence["x"] = 1;
normalXPrecedence["x^2"] = 2;
normalXPrecedence["x^3"] = 3;
normalXPrecedence["x^4"] = 4;
normalXPrecedence["x^5"] = 5;
normalXPrecedence["x^6"] = 6;
ect, filling up both X and Y lists.
wxDev-C++ gives these errors:
10 FilepathCut expected constructor, destructor, or type conversion before '=' token
10 FilepathCut expected `,' or `;' before '=' token
11 FilepathCut expected constructor, destructor, or type conversion before '=' token
11 FilepathCut expected `,' or `;' before '=' token
12 FilepathCut expected constructor, destructor, or type conversion before '=' token
and so on for every single time I try to add something into the list.
So, could someone tell me what Im doing wrong? I tried to initialize the map in a variety of ways like:
map<string, int> normalXPrecedence = map<string, int>::map();
map<string, int> normalXPrecedence = map();
But nothing works *sigh* Can anyone help me?