Quote:Original post by FrunyQuote:Original post by snk_kid
i mean't instead of pointer to member functions or pointer to data members, why no reference to member functions or reference to data members but you can with free/class functions.
Hmmm. Good question. I didn't even know you could not.
i was stuck with that recently.
thread
additional info
I'm a Pascal programmer swiched to C++ not so long ago, yet i have no troubles answering such questions.
BTW :
"
Why does the following code segment display
"x does not equal 0.01, y equals 0.05"?
float x = 0.01;
float y = 0.05;
if (x != 0.01) cout << "x does not equal 0.01, ";
if (y == 0.05) cout << "y equals 0.05";
"
probably there should be 0.5 , not 0.05
0.05 can't be exactly represented by float nor double. When comparing, IIRC on x68 float is converted to double. IIRC by standard, it's double must be converted to float, but i'm not 100% sure.