D
Dhruv
Hello All,
I have the following code:
***************************************
int numb=1;
std:stringstream o;
o << "1-";
for(i=0;i<1000;i++)
{
o << num;
s = o.str();
num++;
cout << s << endl;
}
***************************************
So as num increments, I want the output as follows:
1-1
1-2
1-3
1-4
1-5...........
For this, I need to initialize ostringstream o to "1-" everytime.
Please help me out with this.
Thanks n Regds,
Bhavesh
I have the following code:
***************************************
int numb=1;
std:stringstream o;
o << "1-";
for(i=0;i<1000;i++)
{
o << num;
s = o.str();
num++;
cout << s << endl;
}
***************************************
So as num increments, I want the output as follows:
1-1
1-2
1-3
1-4
1-5...........
For this, I need to initialize ostringstream o to "1-" everytime.
Please help me out with this.
Thanks n Regds,
Bhavesh