| View previous topic :: View next topic |
| Author |
Message |
Guest
|
Posted: Mon Feb 27, 2006 10:06 pm Post subject: Overloading a function with const input parameter? |
|
|
Hi,
Is it possible to over load a function of a class with const input
parameter ?
class A {
public:
void aFunc(const B& b);
void aFunc(B& b);
}
and they have different implementation:
A::aFunc(const B& b) {
//....
}
A::aFunc(B& b) {
//....
} |
|
| Back to top |
|
 |
Victor Bazarov Guest
|
Posted: Mon Feb 27, 2006 11:06 pm Post subject: Re: Overloading a function with const input parameter? |
|
|
Plissken.s (AT) gmail (DOT) com wrote:
| Quote: | Is it possible to over load a function of a class with const input
parameter ?
class A {
public:
void aFunc(const B& b);
void aFunc(B& b);
}
and they have different implementation:
A::aFunc(const B& b) {
//....
}
A::aFunc(B& b) {
//....
}
|
Why ask when you can simply try it?
V
--
Please remove capital As from my address when replying by mail |
|
| Back to top |
|
 |
Guest
|
Posted: Tue Feb 28, 2006 12:06 am Post subject: Re: Overloading a function with const input parameter? |
|
|
yes its possible, and as vic said, try and c |
|
| Back to top |
|
 |
|