importing file

I am creating a program that imports a file into a structure does some clean-up and then produce a output file.
Below is the code I use to import the file into my structure. I only gave part of the code. I think the rest is not necessary
1
2
3
4
char ligne[LONGUEUR+1];
fichier.getline(ligne,LONGUEUR);

strncpy(Liste[n].ligne, ligne,LONGUEUR);


When I import, is there a way to skip the first two characters of each line
Playing around with char is always tricky. Assume variable ligne after getline will always be at least > first two characters, you can use below.

 
strncpy(Liste[n].ligne, ligne+2,LONGUEUR-2);
Last edited on
t'est Francais?
Topic archived. No new replies allowed.