There are some questions on SO that are extremely similar: How to convert pugi::char_t* to string
I have been struggling with this problem for awhile, and as a beginner I'm really not sure what else to do other than ask here so I am sorry if this counts as duplicate.
pugi::xml_node actors = source_file.child("scene").child("actors");
std::vector<const char*> actor_db;
for (pugi::xml_node actor = actors.first_child(); actor; actor = actor.next_sibling())
{
const char *a = *actor.child_value();
actor_db[actor.attribute("id").as_int()] = a;
}
a value of type "pugi::char_t" cannot be used to initialize an entity of type "const char *"
The line const char *a = *actor.child_value(); is my poor attempt to try to cast the return value of const char_t* xml_node::child_value() as a const char*.
I want the value of actor.child_value() to be stored in a const char* then put inside of the vector actor_db.
pugi::char_t is a type that is either a char or wchar_t depending on the configuration. I have set it up so that pugi::char_t will be a char.
I know this is probably a simple error, but even with my extensive searching and the similar SO questions I am still unable to resolve my issue.