Click here to Skip to main content
15,915,842 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionC++ wrappers for C struct api Pin
Kishore Jonnalagadda9-Jul-08 15:14
Kishore Jonnalagadda9-Jul-08 15:14 
AnswerRe: C++ wrappers for C struct api Pin
Saurabh.Garg9-Jul-08 17:57
Saurabh.Garg9-Jul-08 17:57 
GeneralRe: C++ wrappers for C struct api Pin
Kishore Jonnalagadda9-Jul-08 18:25
Kishore Jonnalagadda9-Jul-08 18:25 
GeneralRe: C++ wrappers for C struct api Pin
Saurabh.Garg9-Jul-08 23:25
Saurabh.Garg9-Jul-08 23:25 
GeneralRe: C++ wrappers for C struct api Pin
Kishore Jonnalagadda10-Jul-08 0:11
Kishore Jonnalagadda10-Jul-08 0:11 
GeneralRe: C++ wrappers for C struct api Pin
Saurabh.Garg10-Jul-08 0:56
Saurabh.Garg10-Jul-08 0:56 
AnswerRe: C++ wrappers for C struct api Pin
BadKarma9-Jul-08 22:54
BadKarma9-Jul-08 22:54 
GeneralRe: C++ wrappers for C struct api Pin
Kishore Jonnalagadda9-Jul-08 23:54
Kishore Jonnalagadda9-Jul-08 23:54 
<quote>Here you make some design error.
The class time encapsulates the 'c' Time struct and giving it some extra functionality. No problem so far. But you're class Timer inherits from the Time class and encapsulates the 'c' timer struct.
Giving you indeed twice the 'c' time struct. According to me this is a fault in the design. The 'C' and 'C++' counterparts are NOT equivalent.
To make the equivalent you should encapsulate either the 'C' Timer struct, or, inherit from the Time class and adding the needed Callback function. But you can't

You are absolutely right. This is the exact problem that i want to solve when writing C++ wrappers.

<quote>Why do you inherit from the time class?

Because the many API's associated with class Time are are also applicable for class Timer. Also, the code presented here is one of the simpler case. The other code that i use also have similar use cases but are somewhat more complex.

Cheers!
Kishore

Questioncall a vbscript and get an output Pin
rocktx9-Jul-08 9:32
rocktx9-Jul-08 9:32 
AnswerRe: call a vbscript and get an output Pin
led mike9-Jul-08 10:10
led mike9-Jul-08 10:10 
QuestionGDI+ Region Outline question Pin
Iain Clarke, Warrior Programmer9-Jul-08 5:44
Iain Clarke, Warrior Programmer9-Jul-08 5:44 
AnswerRe: GDI+ Region Outline question Pin
Mark Salsbery9-Jul-08 6:21
Mark Salsbery9-Jul-08 6:21 
GeneralRe: GDI+ Region Outline question Pin
Iain Clarke, Warrior Programmer9-Jul-08 11:36
Iain Clarke, Warrior Programmer9-Jul-08 11:36 
QuestionRetriving the user privilage set using WINAPI Pin
vineeshV9-Jul-08 3:17
vineeshV9-Jul-08 3:17 
AnswerRe: Retriving the user privilage set using WINAPI Pin
Iain Clarke, Warrior Programmer9-Jul-08 4:47
Iain Clarke, Warrior Programmer9-Jul-08 4:47 
GeneralRe: Retriving the user privilage set using WINAPI Pin
David Crow9-Jul-08 5:03
David Crow9-Jul-08 5:03 
Questionfriend member function in VC++ 2008 Pin
Andy Rama9-Jul-08 2:45
Andy Rama9-Jul-08 2:45 
AnswerRe: friend member function in VC++ 2008 Pin
Nibu babu thomas9-Jul-08 2:53
Nibu babu thomas9-Jul-08 2:53 
GeneralRe: friend member function in VC++ 2008 Pin
Andy Rama9-Jul-08 3:05
Andy Rama9-Jul-08 3:05 
QuestionRe: friend member function in VC++ 2008 Pin
David Crow9-Jul-08 2:56
David Crow9-Jul-08 2:56 
AnswerRe: friend member function in VC++ 2008 Pin
Andy Rama9-Jul-08 2:58
Andy Rama9-Jul-08 2:58 
GeneralRe: friend member function in VC++ 2008 Pin
toxcct9-Jul-08 5:54
toxcct9-Jul-08 5:54 
QuestionRe: friend member function in VC++ 2008 Pin
Andy Rama9-Jul-08 20:20
Andy Rama9-Jul-08 20:20 
Questiondisplay message Pin
tns_ranjith8-Jul-08 23:46
tns_ranjith8-Jul-08 23:46 
AnswerRepost.. Pin
SandipG 8-Jul-08 23:55
SandipG 8-Jul-08 23:55 

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.