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
| using namespace std;
int main() {
int num_ligne = 0;
string contenu_ligne;
string tab_lignes[255];
string reste_lignes;
const char* nom_fichier;
ofstream fichier_t("/home/toto/Desktop/Serveur de résultats/test.txt", ios::in);
string rep_fichiers_nt_new = "/home/toto/Desktop/Serveur de résultats/fichiers non traités/09071110144_20090711171858.txt";
ifstream fichier_nt(rep_fichiers_nt_new.c_str ());
while (getline(fichier_nt, contenu_ligne)) {
cout << contenu_ligne << endl;
fichier_t << contenu_ligne;
num_ligne = num_ligne + 1;
cout << num_ligne << endl;
}
} |