Good day guys, this is my first time posting, so if there is anything I should know about this particular forum, please do let me know!
I have tried searching on the internet, but do you guys know what does this line do?
istringstream is(Expr);
if(Expr.at(i)=='(') p++;
return Value_Of_Expr(Expr.substr(0,i))+Value_Of_Expr(Expr .substr(i+1,Expr.length()-i-1));
These three lines have something I don't understand, such as :
istringstream is(XX) - What does it do?
if(Exr.at(i)=='(') p++;
return Value_Of_Expr(Expr.substr(0,i))+Value_Of_Expr(Expr.substr(i+1,Expr.length()-i-1));
|
Mentor
|
![]() |
| 5Oct2009,03:58 | #2 |
|
When you post, there are posting guidelines, including how to post code. READ THEM PLEASE.
They're not easy to miss. istringstream is(XX) creates an istringstream object named is, using a constructor that takes an XX as its argument, so it creates an istringstream from an XX. Code:
if(Exr.at(i)=='(') p++;
Code:
if( Exr.at(i) == '(' ) p++;
gabuchia
like this
|
|
Go4Expert Member
|
|
| 6Oct2009,18:12 | #3 |
|
Thank you for helping me out with that! I'm sorry I did not post a little chunk of code here because I thought if I could comprehend those few lines, I would be able to understand it.
istringstream is(Expr);thank you for helping me out with my little project here, I appreciate that! |

