Is it safe for me to delete one of those two functions with the same name 'getTime'
From: Xiangliang Meng (xiangliang_meng_at_hotmail.com)
Date: 08/31/04
- Next message: Per Nordlöw: "g++ loop unrolling performance"
- Previous message: Nick L: "Loop Does'nt Work, Hard code does"
- Next in thread: Sharad Kala: "Re: Is it safe for me to delete one of those two functions with the same name 'getTime'"
- Reply: Sharad Kala: "Re: Is it safe for me to delete one of those two functions with the same name 'getTime'"
- Reply: Denis Remezov: "Re: Is it safe for me to delete one of those two functions with the same name 'getTime'"
- Reply: Daniel T.: "Re: Is it safe for me to delete one of those two functions with the same name 'getTime'"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 31 Aug 2004 14:37:19 +0800
Hi, all
class Clock
{
Clock() { Time_m = 0;}
void setTime(unsigned int time = 0)
{
Time_m = time;
}
unsigned int getTime() const
{
return Time_m;
}
unsigned int getTime()
{
return Time_m;
}
private:
unsigned int Time_m;
};
Is it safe for me to delete one of those two functions with the same name
'getTime'? Are there 'big' differences between those two funtions for users
of this class?
If I find some function call Clock::getTime(), how can I know whether it
will invoke the first one or the second one?
Best Regards,
Xiangliang Meng
- Next message: Per Nordlöw: "g++ loop unrolling performance"
- Previous message: Nick L: "Loop Does'nt Work, Hard code does"
- Next in thread: Sharad Kala: "Re: Is it safe for me to delete one of those two functions with the same name 'getTime'"
- Reply: Sharad Kala: "Re: Is it safe for me to delete one of those two functions with the same name 'getTime'"
- Reply: Denis Remezov: "Re: Is it safe for me to delete one of those two functions with the same name 'getTime'"
- Reply: Daniel T.: "Re: Is it safe for me to delete one of those two functions with the same name 'getTime'"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|