with each increase of j, increase i too... and also print i
1 2 3 4 5 6 7 8 9
for(int i=0; i<1000; ++i)
{
for(int j=0; j < T; ++j, ++i)
{
// fill the vector on ith position with j's value here
cout<<"N[ " << i << "] = " << j <<endl; // do not print j, print value from vector instead
if(i == 999) break; // have to check whether i is not 999 already
}
}