ça a finalement marché, merci, en fait j'utilise un istream:
#include <string>
#include <fstream>
#include <istream>
#include <iostream>
using namespace std;
int main()
{
filebuf fb;
fb.open("test.txt",ios::in); //Le fichier istream contient les données
istream is(&fb);
if ( is )
{
int counter=0;
int ligne;
while ( is >> ligne )
{
cout << ligne <<endl;
counter++;
if(counter==11)
{
counter=0;
cout << "new line" << endl;
}
}
}
return 1;
}
Youppi