how to count line by line:
the output look like this:
there are 6 numbers in data set 1 :
there are 4 numbers in data set 2 :
my problem is, when i run the output all going to be set 1 for every set of data..
{
int i;
int count =0;
infile >> n;
for (i=0; i < n; i++)
{
infile >> x[i];
}
count ++;
cout << "There are " << n << " numbers in data set " << count << ":" << endl;
count=0;
}
}