Run program in pieces

Hi,

I try to do the following:

1
2
3
4
5
6
7
int main ()
{
int numobs //number of observations
//  statement a<numobs<b, then c<numobs<d -> a<b<c<d
funct();
return 0;
}


So want to split up numobs in pieces and to use each piece as an input for the same function(s), but I do not know which is the appropriate statement...

10x for the assistance in advance!
I'm sorry, I can't understand your question at all.

Can you rephrase / clarify?
What?

Sorry for the unclear question...

First some background information

I use txt file with data which I use for estimation of a model and each line in the the text file is an observation.
numobs is a variable (integer) which stays for the number of the lines in the text file.

Now I can do the estimation by using all the observations, but I would like also to do estimations with smaller number of observations and I am wondering how to do this.

Let's assume the text file contains 100 lines (observations). I would like to do estimation with the first 10 lines (observations), then with the second 10 lines and so on...

The code in my first post was actually supposed to illustrate only the structure of the program.

Hopefully now it is better explained
http://cplusplus.com/doc/tutorial/files/
using the string class http://cplusplus.com/reference/string/string/
get each line and convert to integers, and do your sums/estimations.
Topic archived. No new replies allowed.