1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- #include "gestionFichiers.h"
- using namespace std;
- int haveNbJoueurs()
- {
- string const nomFichierParametre("config.txt");
- ifstream fluxIn(nomFichierParametre.c_str());
- if (fluxIn)
- {
-
- int nbJoueurs;
- fluxIn >> nbJoueurs;
- return nbJoueurs;
- }
- else
- {
-
- cout << "ERREUR: impossible de lire le fichier " << nomFichierParametre << " ." << endl;
- return -1;
- }
- }
|