Click here to Skip to main content
15,868,014 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionBitmap Planes Pin
Sarath C30-May-06 20:41
Sarath C30-May-06 20:41 
AnswerRe: Bitmap Planes Pin
Steve Echols30-May-06 21:57
Steve Echols30-May-06 21:57 
GeneralRe: Bitmap Planes Pin
NiceNaidu30-May-06 22:52
NiceNaidu30-May-06 22:52 
Question.obj, .lib and .dll? Pin
Polite Programmer30-May-06 20:40
Polite Programmer30-May-06 20:40 
AnswerRe: .obj, .lib and .dll? Pin
Cedric Moonen30-May-06 21:03
Cedric Moonen30-May-06 21:03 
GeneralRe: .obj, .lib and .dll? Pin
NiceNaidu30-May-06 21:19
NiceNaidu30-May-06 21:19 
GeneralRe: .obj, .lib and .dll? Pin
Polite Programmer31-May-06 19:15
Polite Programmer31-May-06 19:15 
QuestionOptional arguments Pin
SWDevil30-May-06 20:39
SWDevil30-May-06 20:39 
Hi,

I have a function that is declared as follows:
void func(int A, int B, int C, int D=-1, int E=-1);
arguments D and E are optional, and so if the function is called like this:
func(A,B,C); then D and E recieve the value -1.

What I want to do is add another optional argument, let's say int F that will also receive -1 as default, for example.
The problem is that sometimes I want to call the function only with the parameters A,B,C and F. If I declare the function like this:
void func(int A, int B, int C, int D=-1, int E=-1, F);
will I be able to call the function in this manner:
func(A,B,C,,,F); ?

AnswerRe: Optional arguments Pin
Nibu babu thomas30-May-06 20:48
Nibu babu thomas30-May-06 20:48 
AnswerRe: Optional arguments Pin
_anil_30-May-06 21:00
_anil_30-May-06 21:00 
GeneralRe: Optional arguments Pin
SWDevil30-May-06 21:16
SWDevil30-May-06 21:16 
GeneralRe: Optional arguments Pin
Cedric Moonen30-May-06 21:18
Cedric Moonen30-May-06 21:18 
GeneralRe: Optional arguments Pin
Owner drawn30-May-06 21:25
Owner drawn30-May-06 21:25 
GeneralRe: Optional arguments Pin
ThatsAlok30-May-06 23:59
ThatsAlok30-May-06 23:59 
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 
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 

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.