Hi I am having this issue and not sure how to resolve.
I am having to compile my code using g++ instead of gcc for a number of reasons, however I am getting:
main.cpp:129: error: invalid conversion from ‘const char*’ to ‘const xmlChar*’
main.cpp:129: error: initializing argument 2 of ‘xmlChar* xmlGetProp(xmlNode*, const xmlChar*)’
Has anyone got any ideas??Code:void getIngredients (xmlDocPtr doc, xmlNodePtr cur) { xmlChar *name; cur = cur->xmlChildrenNode; while (cur != NULL) { if ((!xmlStrcmp(cur->name, (const xmlChar *)"ingredient"))) { name = xmlGetProp(cur, "name"); printf("name: %s\n", name); xmlFree(name); }



1Likes
LinkBack URL
About LinkBacks


