Bonjour,

je veux rentrer plusieurs fichiers en input(3 dans mon exemple en argument), je ne sais pas comment les récupérer séparément:
--I testO.txt
--I workspace/FloatToFix/iir_light2.xml
--I workspace/FloatToFix/sfg.dtd

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
 
	po::options_description desc((char*)"Allowed options");
 
	desc.add_options()
	("help", "produce help message")
	("I", po::value< vector<string> >(), "input file")
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
if (vm.count("include-path"))
	{
		cout << "Include paths are: "
		<< vm["include-path"].as< vector<string> >() << "\n";
	}
me renvoie:

Input files are: testO.txt workspace/FloatToFix/iir_light2.xml workspace/FloatToFix/sfg.dtd
Je ne trouve pas la méthode pour récuperer la string "testO.txt" seulement....
un truc du style:
cout << "le premier est: " << vm["I"][0].as<string>() << "\n";
merci de votre aide