Hi Everybody,
I need a help to modify my program. My program as follows,
C++ Code:
if (found) {
// Read Lines below NODES
while(getline(input, buff)) {
// getline(input, buff);
istringstream tmp(buff);
// format the output
string a, b, c, d, e;
tmp >> a >> b >> c >> d >> e;
output <<b << " " << c << " " << d << endl;
cout << b << " " << c << " " << d << endl;
}
}
I read data from files and put into another file. I am reading the datas as string, Now I want to add "1" to each data (ex: if data is 20 the output should be 21). Pls help me how can I do it.
Sitha.
I need a help to modify my program. My program as follows,
C++ Code:
if (found) {
// Read Lines below NODES
while(getline(input, buff)) {
// getline(input, buff);
istringstream tmp(buff);
// format the output
string a, b, c, d, e;
tmp >> a >> b >> c >> d >> e;
output <<b << " " << c << " " << d << endl;
cout << b << " " << c << " " << d << endl;
}
}
I read data from files and put into another file. I am reading the datas as string, Now I want to add "1" to each data (ex: if data is 20 the output should be 21). Pls help me how can I do it.
Sitha.