#include <iostream>
usingnamespace std;
int Rownumgen(int input,int streamno,int nostream)
{
/*This programme should return numbers in sequence irrespective of stream number.
here input means gives the record number such as first record it gives 1 second record 2........etc n.
steamno means stream number, if we have total 3 streams and this is first stream this would be 1.
nostream means total no. of streams eg: 3
Eg: we have total 10 rows.
stream 1 has 9 and stream 2 has 1 and stream 3 0 rows.
Output would be
1
2
3
4
5
6
7
8
9
10
*/
int Number=((nostream * (input -1)) + streamno);
Return Number;
}
But this code gives as below
1
2
4
7
10
13
16
19
22
25
This code might be wrong completely, but i tried with the logig "Number=((nostream * (input -1)) + streamno)" I am not much aware of c++ coding(Any coding). Here the records/rows are passed one by one its a parallel process
so thought posting here to get the code if some one can help.