C
ciccio
Hi,
This is most likely a question asked very often, and I have been
searching for answers in several books and sites but not found.
Assume the following classes and following function.
class foo;
class bar {
public:
foo g(void) const;
foo &g(void);
}
void f(const &foo);
When I call the following
bar tmp;
f(tmp.g());
Which of the two will be called and why?
And the bigger question of this is, what is the general order of
function calls when they are overloaded?
Thanks for the help
This is most likely a question asked very often, and I have been
searching for answers in several books and sites but not found.
Assume the following classes and following function.
class foo;
class bar {
public:
foo g(void) const;
foo &g(void);
}
void f(const &foo);
When I call the following
bar tmp;
f(tmp.g());
Which of the two will be called and why?
And the bigger question of this is, what is the general order of
function calls when they are overloaded?
Thanks for the help