Answers for "creer un fichier cpp"

C++
0

ouvrir un fichier en cpp

#include <iostream>
#include <fstream>
#include <string>
using namespace std; 

int main()
{
   ifstream fichier("YOUR_FILE");

   if(fichier) {
      string ligne;

      while(getline(fichier, ligne)) {
         cout << ligne << endl;
      }
   } else {
      cout << "ERREUR: Impossible d'ouvrir le fichier en lecture." << endl;
   }
   return 0;
}
Posted by: Guest on January-12-2021

Code answers related to "creer un fichier cpp"

Browse Popular Code Answers by Language