Click here to Skip to main content
15,885,309 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Optional arguments Pin
Rajesh R Subramanian9-Oct-06 21:54
professionalRajesh R Subramanian9-Oct-06 21:54 
GeneralRe: Optional arguments Pin
Owner drawn16-Oct-06 19:25
Owner drawn16-Oct-06 19:25 
GeneralRe: Optional arguments Pin
_anil_30-May-06 21:29
_anil_30-May-06 21:29 
AnswerRe: Optional arguments Pin
toxcct30-May-06 21:46
toxcct30-May-06 21:46 
GeneralRe: Optional arguments Pin
SWDevil30-May-06 21:59
SWDevil30-May-06 21:59 
GeneralRe: Optional arguments Pin
toxcct30-May-06 22:04
toxcct30-May-06 22:04 
GeneralRe: Optional arguments Pin
ThatsAlok31-May-06 17:50
ThatsAlok31-May-06 17:50 
AnswerRe: Optional arguments Pin
BadKarma30-May-06 22:50
BadKarma30-May-06 22:50 
Hi,
the simples solution is to provide a wrapper macro for your function
void func(int A, int B, int C, int D=-1, int E=-1, int F=-1);
#define FUNC(a_, b_, c_, f_) func(a_, b_, c_, -1, -1, f_)

This way you can simply call it through the macro in those rare occasions where only the F should be given.
void Call()
{
  int A, B, C, D, E, F;

  // normal call
  func(A, B, C);
  func(A, B, C, D, E, F);

  // special call
  FUNC(A, B, C, F);
}


codito ergo sum
QuestionWM_GETTEXT and GetWindowText [modified] Pin
HakunaMatada30-May-06 20:14
HakunaMatada30-May-06 20:14 
AnswerRe: WM_GETTEXT and GetWindowText [modified] Pin
Stephen Hewitt30-May-06 20:27
Stephen Hewitt30-May-06 20:27 
GeneralRe: WM_GETTEXT and GetWindowText [modified] Pin
HakunaMatada30-May-06 20:31
HakunaMatada30-May-06 20:31 
GeneralRe: WM_GETTEXT and GetWindowText Pin
ThatsAlok30-May-06 23:51
ThatsAlok30-May-06 23:51 
GeneralRe: WM_GETTEXT and GetWindowText Pin
Stephen Hewitt31-May-06 13:39
Stephen Hewitt31-May-06 13:39 
AnswerRe: WM_GETTEXT and GetWindowText [modified] Pin
NiceNaidu30-May-06 20:27
NiceNaidu30-May-06 20:27 
AnswerRe: WM_GETTEXT and GetWindowText [modified] Pin
Hamid_RT30-May-06 20:49
Hamid_RT30-May-06 20:49 
GeneralRe: WM_GETTEXT and GetWindowText [modified] Pin
HakunaMatada30-May-06 20:33
HakunaMatada30-May-06 20:33 
GeneralRe: WM_GETTEXT and GetWindowText [modified] Pin
Hamid_RT30-May-06 20:52
Hamid_RT30-May-06 20:52 
GeneralRe: WM_GETTEXT and GetWindowText Pin
ThatsAlok30-May-06 23:50
ThatsAlok30-May-06 23:50 
QuestionSetWaitableTimer on IA64 Pin
joshiparsu30-May-06 20:10
joshiparsu30-May-06 20:10 
AnswerRe: SetWaitableTimer on IA64 Pin
NiceNaidu30-May-06 20:18
NiceNaidu30-May-06 20:18 
QuestionSet Icon for application Pin
kkkkkkkkkkkkkkkkkkk30-May-06 20:07
kkkkkkkkkkkkkkkkkkk30-May-06 20:07 
AnswerRe: Set Icon for application Pin
NiceNaidu30-May-06 20:13
NiceNaidu30-May-06 20:13 
AnswerRe: Set Icon for application Pin
Hamid_RT30-May-06 20:16
Hamid_RT30-May-06 20:16 
QuestionRegNotifyChangeKeyValue Pin
simonchen.net30-May-06 20:01
simonchen.net30-May-06 20:01 
AnswerRe: RegNotifyChangeKeyValue Pin
Hamid_RT30-May-06 20:19
Hamid_RT30-May-06 20:19 

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.