Click here to Skip to main content
15,917,795 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: how to capture the URL of the image Pin
shi baoshi28-Jul-09 21:26
shi baoshi28-Jul-09 21:26 
GeneralRe: how to capture the URL of the image [modified] Pin
Code-o-mat28-Jul-09 21:49
Code-o-mat28-Jul-09 21:49 
GeneralRe: how to capture the URL of the image Pin
shi baoshi29-Jul-09 3:14
shi baoshi29-Jul-09 3:14 
GeneralRe: how to capture the URL of the image Pin
Code-o-mat29-Jul-09 3:28
Code-o-mat29-Jul-09 3:28 
GeneralRe: how to capture the URL of the image [modified] Pin
shi baoshi29-Jul-09 3:51
shi baoshi29-Jul-09 3:51 
AnswerRe: how to capture the URL of the image Pin
Rozis29-Jul-09 10:37
Rozis29-Jul-09 10:37 
GeneralRe: how to capture the URL of the image [modified] Pin
shi baoshi30-Jul-09 4:19
shi baoshi30-Jul-09 4:19 
Questionneed a class for generating security file Pin
includeh1028-Jul-09 16:29
includeh1028-Jul-09 16:29 
AnswerRe: need a class for generating security file Pin
«_Superman_»28-Jul-09 16:35
professional«_Superman_»28-Jul-09 16:35 
GeneralRe: need a class for generating security file Pin
includeh1028-Jul-09 16:55
includeh1028-Jul-09 16:55 
QuestionCTime and time zone calculations Pin
john john mackey28-Jul-09 13:25
john john mackey28-Jul-09 13:25 
AnswerRe: CTime and time zone calculations Pin
David Crow29-Jul-09 2:51
David Crow29-Jul-09 2:51 
QuestionVector C++ Pin
resolvequestion28-Jul-09 12:23
resolvequestion28-Jul-09 12:23 
AnswerRe: Vector C++ Pin
David Crow29-Jul-09 2:53
David Crow29-Jul-09 2:53 
QuestionOverloaded functions - best approach Pin
john john mackey28-Jul-09 11:57
john john mackey28-Jul-09 11:57 
AnswerRe: Overloaded functions - best approach Pin
Rick York28-Jul-09 15:04
mveRick York28-Jul-09 15:04 
AnswerRe: Overloaded functions - best approach Pin
«_Superman_»28-Jul-09 16:37
professional«_Superman_»28-Jul-09 16:37 
GeneralRe: Overloaded functions - best approach Pin
john john mackey29-Jul-09 6:31
john john mackey29-Jul-09 6:31 
AnswerRe: Overloaded functions - best approach Pin
KarstenK28-Jul-09 21:07
mveKarstenK28-Jul-09 21:07 
AnswerRe: Overloaded functions - best approach Pin
Iain Clarke, Warrior Programmer28-Jul-09 23:57
Iain Clarke, Warrior Programmer28-Jul-09 23:57 
Erm, I may be a bit thick...

But to read your post:


john john mackey wrote:
CMyClassA
bool GetAbsTime(SYSTEMTIME *startTime, double hourTime, ClockTime *absTime);
...
CMyClassB
bool GetAbsTime(SYSTEMTIME *realWorldTime, double hourTime, ClockTime *absTime);
...


You have two classes, and they have method that have the same name. So what? I can do the following if I like:
CCorrect
{
public:
    UINT HowCoolIsIain () { return 99; }
};
CWrong {
public:
    UINT HowCoolIsIain () { return 1; }
};

main ()
{
  CCorrect answer1l;
  CWrong answer1l;

  cout << answer1.HowCoolIsIain ();
  cout << answer2.HowCoolIsIain ();
}


This is not operator overloading. I could have called those two functions Alive and Bob, and it would have generated the same machine code. Done the same thing... It can be handy doing this sort of thing - many of my classes have a GetSize () method for how large they'd be if stored on the hard disk, etc.

Iain.

I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need cotract work done, give me a job! http://cv.imcsoft.co.uk/[^]

GeneralRe: Overloaded functions - best approach Pin
john john mackey29-Jul-09 6:25
john john mackey29-Jul-09 6:25 
GeneralRe: Overloaded functions - best approach Pin
Rick York29-Jul-09 6:38
mveRick York29-Jul-09 6:38 
QuestionMouse drawing on picture control Pin
kudlaty7928-Jul-09 11:03
kudlaty7928-Jul-09 11:03 
AnswerRe: Mouse drawing on picture control Pin
«_Superman_»28-Jul-09 16:42
professional«_Superman_»28-Jul-09 16:42 
AnswerRe: Mouse drawing on picture control Pin
kudlaty7929-Jul-09 4:26
kudlaty7929-Jul-09 4:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.