if your file is tab delimited all the way, then you can read it like that:
just make sure how the data types are stored...in my code i assume that all file is contains int values! if you have different data types you should change the fscanf.Code:FILE *fp = ::fopen( "c:\\file.txt" ,"r"); if (!fp) return; while ( fp && feof(fp) == 0 ) { int a=0,b=0,c=0,d=0,e=0,f=0,g=0; ::fscanf(fp,"%d\t%d\t%d\t%d\t%d\t%d\t%d\n",&a,&b,&c,&d,&e,&f,&g); } ::fclose(fp);
Cheers




Reply With Quote