Click here to Skip to main content
15,895,084 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: "Debug Assert Error" in VC++.NET Pin
josda100010-Jul-09 16:02
josda100010-Jul-09 16:02 
AnswerRe: "Debug Assert Error" in VC++.NET Pin
Stuart Dootson10-Jul-09 8:35
professionalStuart Dootson10-Jul-09 8:35 
QuestionRelease Mode issue Pin
dipuks10-Jul-09 7:30
dipuks10-Jul-09 7:30 
AnswerRe: Release Mode issue Pin
Stuart Dootson10-Jul-09 8:31
professionalStuart Dootson10-Jul-09 8:31 
AnswerRe: Release Mode issue Pin
Cyrilix10-Jul-09 11:29
Cyrilix10-Jul-09 11:29 
QuestionCD Drive functions Pin
dipuks10-Jul-09 7:27
dipuks10-Jul-09 7:27 
AnswerRe: CD Drive functions Pin
David Crow10-Jul-09 8:00
David Crow10-Jul-09 8:00 
Questiondefault parameters - functions Pin
john john mackey10-Jul-09 6:41
john john mackey10-Jul-09 6:41 
if I define a function like

int MakeBigger(int nVal1, int nVal2, int nMultiplier /*=2*/)
{
   int nRetValue;
   nRetValue = (nVal1+nVal2) * nMultiplier;
   return (nRetValue);
}


is it necessary that the default parameter (nMultiplier) be the last parameter in the list?

For example, could the following be valid:
int MakeBigger(int nVal1, int nMultiplier/*=2*/, int nVal2)
{
}

or also
int MakeBigger(int nMultiplier/*=2*/, int nVal1, int nVal2)
{
}


ALSO
Is it valid to have more than one default parameter? AND what is the correct syntax:
int MyFn(int nDefaultParam/*=2*/)
OR
int MyFn(int nDefaultParam=2)



Thanks,
Johnny
AnswerRe: default parameters - functions Pin
krmed10-Jul-09 7:01
krmed10-Jul-09 7:01 
GeneralRe: default parameters - functions Pin
john john mackey10-Jul-09 7:34
john john mackey10-Jul-09 7:34 
GeneralRe: default parameters - functions Pin
David Crow10-Jul-09 8:02
David Crow10-Jul-09 8:02 
AnswerRe: default parameters - functions Pin
josda100010-Jul-09 8:05
josda100010-Jul-09 8:05 
GeneralRe: default parameters - functions Pin
John R. Shaw10-Jul-09 8:09
John R. Shaw10-Jul-09 8:09 
GeneralRe: default parameters - functions Pin
rew´RaZiel17-Jul-09 21:40
rew´RaZiel17-Jul-09 21:40 
QuestionCreate 16 bit process under 32bit using CreateProcess Pin
RoryODonnell10-Jul-09 4:41
RoryODonnell10-Jul-09 4:41 
Questioncrashed ( i CSimpleStringT ) when new control are added to dialog Pin
Bilge Kaan10-Jul-09 4:02
Bilge Kaan10-Jul-09 4:02 
QuestionRe: crashed ( i CSimpleStringT ) when new control are added to dialog Pin
David Crow10-Jul-09 4:33
David Crow10-Jul-09 4:33 
AnswerRe: crashed ( i CSimpleStringT ) when new control are added to dialog Pin
Bilge Kaan10-Jul-09 5:04
Bilge Kaan10-Jul-09 5:04 
QuestionRe: crashed ( i CSimpleStringT ) when new control are added to dialog Pin
David Crow10-Jul-09 5:28
David Crow10-Jul-09 5:28 
QuestionLinking error LNK2019 while building DLL Pin
Member 154408710-Jul-09 2:37
Member 154408710-Jul-09 2:37 
AnswerRe: Linking error LNK2019 while building DLL [modified] Pin
Adam Roderick J10-Jul-09 2:50
Adam Roderick J10-Jul-09 2:50 
AnswerRe: Linking error LNK2019 while building DLL Pin
Stuart Dootson10-Jul-09 4:14
professionalStuart Dootson10-Jul-09 4:14 
QuestionImage list number associated with the column comes wrong while using Header_GetItem Pin
mutpan10-Jul-09 1:44
mutpan10-Jul-09 1:44 
QuestionScroll view background color Pin
Nikesh Jagtap10-Jul-09 0:53
Nikesh Jagtap10-Jul-09 0:53 
AnswerRe: Scroll view background color Pin
Chandrasekharan P10-Jul-09 1:05
Chandrasekharan P10-Jul-09 1:05 

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.