Hi I have the below class
I want to initialize the static map which takes string , string
But when I compile it is giving me an erro like constant expression is required.
class FunctionCaller{
static std::map<std::s tring,std::stri ng> functionMap;
public:
FunctionCaller( ){}
};
std::map<std::s tring,std::stri ng>FunctionCall er::functionMap["function1"] = "obj1";
please suggest
Thanks
I want to initialize the static map which takes string , string
But when I compile it is giving me an erro like constant expression is required.
class FunctionCaller{
static std::map<std::s tring,std::stri ng> functionMap;
public:
FunctionCaller( ){}
};
std::map<std::s tring,std::stri ng>FunctionCall er::functionMap["function1"] = "obj1";
please suggest
Thanks
Comment