if(ini_getstr(getname("hello"))) //this is the getname function call
char* ini_getstr(char * key) { //some code }
char* getname(std::string name) //need to return char*
{
std::string ininame("name");
ininame.append(":"+name);
return (*char)ininame.c_str();//cpp check complains dangerous use of c_str().
}
Aucun commentaire:
Enregistrer un commentaire