// This function loads a pinball table from an XML file.
bool LoadPinballTable(b2World &physics_world, std::vector<GameEntity*> &entity_list){
usingnamespace rapidxml;
std::string input_xml;
std::string line;
std::ifstream in("testtable.xml");
// read file into input_xml
while(getline(in,line)){
std::cout << line << std::endl;
input_xml += line;
}
// Run the RapidXML parser inputting the string that has just been loaded.
std::vector<char> xml_copy(input_xml.begin(), input_xml.end());
xml_copy.push_back('\0');
xml_document<> doc;
doc.parse<parse_full>(&xml_copy[0]);
xml_node<> *node = doc.first_node(0);
// Iterate over the DOM tree
while (node != 0){
std::cout << "Name of node is: " << *node->name()<< "\n";
// If we encounter a staticwall tag, start making a static wall (strcmp(char[],string) instead of char[] == string)
if ((strcmp((*node->name()), "staticwall") == 0)) // <<<--- Compile error here{
// More code after this...