Hello everybody, ive been looking for an answer to this basic (i thing) issue:
Im making a class to read a XML file but the compiling errors are driving me crazy, i cannot figure out how to solve this problem, so here is the code if anyone can help me:
-------------------------
#include <iostream>
using namespace std;
#include "leeXML.h"
int main (int argc, char* argv[])
{
xmlDocPtr doc;
doc = xmlParseFile(argv[1]);
doc.leerEntrada();
return 0;
}
-------------------------
When i compile the class it gives me this error:
-------------------------
main.cc: In function ‘int main(int, char**)’:
main.cc:9: error: request for member ‘leerEntrada’ in ‘doc’, which is of non-class type ‘xmlDoc*’
-------------------------
So i found on google the right way to write the code is changing the . for -> on the line doc.leerEntrada();. Then when i try that way it gives me this another error:
-------------------------
main.cc: In function ‘int main(int, char**)’:
main.cc:9: error: ‘struct _xmlDoc’ has no member named ‘leerEntrada’
-------------------------
What means those errors?
Plase help, it is very important!!