Quantcast
Browsing latest articles
Browse All 4 View Live

C2679 with classes

Well, if you have to use a (non-const) double& - presumably, so that the function can modify the parameter and the caller can observe this change - then you have to use it. If the choice is between...

View Article


C2679 with classes

Thank you for your immediate answer. I can work with that. For my education, could you add a few words on when the double&is preferable to the double by value?gabriel weinreich

View Article


C2679 with classes

FOO2 &FOO2::operator=( double &RHS_double ) Make this take a const double&, or better still, just double by value. A non-const reference can't bind to a temporary, which (xxx+yyy) is.Igor...

View Article

C2679 with classes

I have condensed my three-file project as much as I can to ask my question. Here is the code:FOO2.h:class FOO2 { public: FOO2( double x, double y ) { _X = x, _Y = y; } FOO2( double x ) { _X = x, _Y =...

View Article
Browsing latest articles
Browse All 4 View Live