Mail Archives: djgpp/1998/11/19/21:33:59
How Do I Chech To See How Mine Lines (Up/Down) A File Is?
Like, say,
--out.dat--
1
2
3
4
----------
and i want my prog to tell me that there are 4 lines in that file, how do i
do that??
here's what i came up with, but it doesn't work..
/*------------snip-------------*/
out_fileR.open("out.dat");
cout << "Checking For File Lines.." << endl;
while (numba != '\n')
{
out_fileR >> numba;
line++;
}
out_fileR.close();
cout << "Printing Out Detected File Lines.." << endl;
out_fileR.open("out.dat");
while (numbal != line)
{
out_fileR >> oute;
cout << oute << endl;
numbal++;
}
/*---------snip--------*/
- Raw text -