Working through "Thinking in c++"... and yes I think I'm understanding it this time, thanks to everyone's help, the other day.
One thing is not terribly clear...
And ... can I do this to control bar's lifetime?Code:void Fred (int x) { // a bunch of code if (x = 3) { Foo bar(31); // class // calls to bar } <--- is bar destroyed here? // a bunch more code } <---or here?
Code:void Fred (int x) { // a bunch of code { Foo bar(31); // class // calls to bar } // a bunch more code }