How to use char* instead of using string as key and value.
map <string, string> m;
m["Test"]= "Pass";
m["Result"]= "Fail";
When i try to use char* as key value there is memory leak.
map <const char*, const char*> m;
m["Test"]= "Pass";
m["Result"]= "Fail";
How to avoid memory leak? Thanks in advance.
Regards
map <string, string> m;
m["Test"]= "Pass";
m["Result"]= "Fail";
When i try to use char* as key value there is memory leak.
map <const char*, const char*> m;
m["Test"]= "Pass";
m["Result"]= "Fail";
How to avoid memory leak? Thanks in advance.
Regards
Comment