Bonjour, je suis en 1ère année de dut info et j' ai un fichier texte à lire mais sauf que j' ai un problème j' aurais donc besoin de votre aide s.v.p, merci d' avance
.
 
Voilà le fichier texte se trouvant sur C et s' appelant ligne.txt.
 
Citation :
 
 1 caraty gr9a12 26/11/11 14:16:37 0 1
 Commentez vos source
 2 caraty gr1a4 26/11/11 14:20:02 0 2
  de commenter    
 
   | 
 
Et voici mon programme(le main):
 
 
#include <iostream>
#include <fstream>
#include <cassert>
using namespace std;
 
int main(){
 ifstream is("C
ligne.txt" );
        assert(is.good());
 const char finligne='\n';
    int i;
 do{
 
 IdMessage idM;
 BlocData blc;
 PaquetReseau pr;
 is >> pr.noPR;
 is >> idM.exp;
 is >> idM.dest;
 is >> idM.d;
 is >> idM.h;
 is >> pr.finMess;
 is>>blc.noBloc;
 is.getline(blc.msg, BlocData :: MAX,'finligne');
 cout <<pr.noPR<<" "<<idM.exp<<" "<<idM.dest<<" "<<idM.d<<" "<<idM.h<<" "<<pr.finMess<<" "<<blc.noBloc<<""<<blc.msg<<endl;
 i++;
 }while(i<3545);
}
 
 ---------------
			
Feedback1:http://forum.hardware.fr/hfr/AchatsVentes/Feedback/feed-back-arslan310-sujet_486576_1.htm