Oui j'utilise la bibliothèque TinyXml. 
	
		
			
			
				
					
 Envoyé par 
JolyLoic
					
				 
				
			
		 
	 
 Je crois que le problème n'est pas ça, j'ai installé et rajouter les fichiers .h à mon projet. Il reconnait " #include <tinyxml.h> " et les fonctions de TinyXml.
l'erreur est :
	
	main.cpp:16: error: cannot convert TiXmlDocument* to const char* for argument 1 to void dump_to_stdout(const char*)
 Voici mon code :
	
	1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
   | #include <stdlib.h>
#include <stdio.h>
#include <iostream>
#include <tinyxml.h>
 
using namespace std;
 
void dump_to_stdout(const char* pFilename)
{
	TiXmlDocument doc(pFilename);
	bool loadOkay = doc.LoadFile();
	if (loadOkay)
	{
		printf("\n%s:\n", pFilename);
		dump_to_stdout( &doc );
	}
	else
	{
		printf("Failed to load file \"%s\"\n", pFilename);
	}
}
 
int main()
{
       dump_to_stdout("example.xml");
 
    return 0;
} | 
 
						
					
Partager