Click here to Skip to main content
15,919,931 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralSending WM_KEYDOWN from other application Pin
Libor Matejka7-Mar-02 10:45
Libor Matejka7-Mar-02 10:45 
GeneralRe: Sending WM_KEYDOWN from other application Pin
Ravi Bhavnani7-Mar-02 11:02
professionalRavi Bhavnani7-Mar-02 11:02 
GeneralRe: Sending WM_KEYDOWN from other application Pin
Tim Deveaux7-Mar-02 11:14
Tim Deveaux7-Mar-02 11:14 
GeneralSearching Through Files Pin
Steven Gregg7-Mar-02 10:44
Steven Gregg7-Mar-02 10:44 
GeneralRe: Searching Through Files Pin
Todd Smith7-Mar-02 12:51
Todd Smith7-Mar-02 12:51 
GeneralRe: Searching Through Files Pin
Tomasz Sowinski7-Mar-02 23:48
Tomasz Sowinski7-Mar-02 23:48 
GeneralLaunch Visual Studio Macro from external application Pin
7-Mar-02 10:21
suss7-Mar-02 10:21 
GeneralMultiple functions versus if/else Pin
RK_20007-Mar-02 10:07
RK_20007-Mar-02 10:07 
Hi,

Suppose you have the following scenario:

Log(CString & szMessage);
Log(); // this one reads its message of a member variable

And you need to add time to the messages before logging them. You essentially have two options:

AddTimeToLog(szMessage)
{
AddTime(szMessage);
}
AddTimeToLog()
{
AddTime(m_szMessage);
}
AddTime()
{
//perform the time addition
}

2nd option...

you can also use an if/else style and only use one single function as opposed to 3 functions and get it done...

I was wondering, which one would be considered efficient and at the same time better programming? Would cluttering your class with multiple functions be considered better than creating a code full of if/else conditions.

thanks
GeneralRe: Multiple functions versus if/else Pin
alex.barylski7-Mar-02 10:35
alex.barylski7-Mar-02 10:35 
GeneralRe: Multiple functions versus if/else Pin
Jon Hulatt7-Mar-02 21:59
Jon Hulatt7-Mar-02 21:59 
GeneralSTL iterator::operator+() Pin
moredip7-Mar-02 9:33
moredip7-Mar-02 9:33 
GeneralRe: STL iterator::operator+() Pin
Christian Graus7-Mar-02 9:41
protectorChristian Graus7-Mar-02 9:41 
GeneralRe: STL iterator::operator+() Pin
moredip7-Mar-02 9:48
moredip7-Mar-02 9:48 
GeneralRe: STL iterator::operator+() Pin
Nemanja Trifunovic7-Mar-02 9:58
Nemanja Trifunovic7-Mar-02 9:58 
GeneralRe: STL iterator::operator+() Pin
Joaquín M López Muñoz7-Mar-02 9:49
Joaquín M López Muñoz7-Mar-02 9:49 
Generalefficient sorting [was: STL iterator::operator+()] Pin
moredip7-Mar-02 9:54
moredip7-Mar-02 9:54 
GeneralRe: efficient sorting [was: STL iterator::operator+()] Pin
Joaquín M López Muñoz7-Mar-02 10:02
Joaquín M López Muñoz7-Mar-02 10:02 
GeneralRe: efficient sorting [was: STL iterator::operator+()] Pin
moredip7-Mar-02 10:15
moredip7-Mar-02 10:15 
GeneralRe: efficient sorting [was: STL iterator::operator+()] Pin
Tomasz Sowinski7-Mar-02 23:52
Tomasz Sowinski7-Mar-02 23:52 
GeneralVC++ object layout Pin
Joaquín M López Muñoz7-Mar-02 9:20
Joaquín M López Muñoz7-Mar-02 9:20 
GeneralRe: VC++ object layout Pin
Serge Krynine7-Mar-02 11:32
Serge Krynine7-Mar-02 11:32 
GeneralRe: VC++ object layout Pin
Joaquín M López Muñoz7-Mar-02 11:35
Joaquín M López Muñoz7-Mar-02 11:35 
GeneralRe: VC++ object layout Pin
Serge Krynine7-Mar-02 11:57
Serge Krynine7-Mar-02 11:57 
GeneralRe: VC++ object layout Pin
Tim Smith7-Mar-02 12:53
Tim Smith7-Mar-02 12:53 
GeneralRe: VC++ object layout Pin
Serge Krynine7-Mar-02 12:56
Serge Krynine7-Mar-02 12:56 

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.