Say I have a simple function:
void foo(int val) {
if(val == 0) {
return;
}
else {
stringstream ss;
ss << "Hello World" << endl << ends;
cout << ss.str();
}
}
If I call the function with val == 0
, does the stringstream object ss ever get constructed? I suspect no, but just want to confirm.