Click here to Skip to main content
15,879,326 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Passing function with parameters as parameter Pin
Greg Utas18-Apr-20 9:07
professionalGreg Utas18-Apr-20 9:07 
GeneralRe: Passing function with parameters as parameter Pin
Vaclav_18-Apr-20 9:22
Vaclav_18-Apr-20 9:22 
AnswerRe: Passing function with parameters as parameter Pin
Greg Utas18-Apr-20 10:24
professionalGreg Utas18-Apr-20 10:24 
GeneralRe: Passing function with parameters as parameter Pin
Vaclav_18-Apr-20 10:52
Vaclav_18-Apr-20 10:52 
GeneralRe: Passing function with parameters as parameter Pin
Greg Utas18-Apr-20 11:04
professionalGreg Utas18-Apr-20 11:04 
GeneralRe: Passing function with parameters as parameter Pin
Vaclav_19-Apr-20 5:47
Vaclav_19-Apr-20 5:47 
GeneralRe: Passing function with parameters as parameter Pin
Greg Utas19-Apr-20 6:05
professionalGreg Utas19-Apr-20 6:05 
GeneralSOLVED Re: Passing function with parameters as parameter Pin
Vaclav_19-Apr-20 9:03
Vaclav_19-Apr-20 9:03 
It is now working, however, the mechanics are NOT what you have presented.
The initial problem was to pass a parameter to the passed function such as
Stencil(parameter); // parameter);
Now in my poor English interpretation I have
A function OpenGL_Stencil with first argument int (*Stencil)(int) and second argument int parameter
The OpenGL_Stencil returns int which is not currently used.
The first argument - function takes the second argument as a -parameter- and returns it.
The returned value is used to switch the code which follows.
That was the original task , however, I could just use the passed second argument to do the switching, without the use of the return value.
But that is just the way I like to make sure the code is actually processing the first argument - the function.

I believe my original misunderstanding was trying to pass the second argument - parameter _ as a argument to the first argument - the function.

Next task - pass multiple arguments or a pointer....

Many thanks for your help, really appreciate it.
Cheers.
AnswerRe: Passing function with parameters as parameter Pin
Richard MacCutchan18-Apr-20 21:21
mveRichard MacCutchan18-Apr-20 21:21 
QuestionMath problem with C code Pin
Vaclav_18-Apr-20 6:47
Vaclav_18-Apr-20 6:47 
AnswerRe: Math problem with C code Pin
k505418-Apr-20 7:00
mvek505418-Apr-20 7:00 
GeneralSOLVED Re: Math problem with C code Pin
Vaclav_18-Apr-20 8:16
Vaclav_18-Apr-20 8:16 
QuestionRe: Math problem with C code Pin
Richard MacCutchan18-Apr-20 7:02
mveRichard MacCutchan18-Apr-20 7:02 
QuestionPass a struct as a function parameter or just use it as a global variable? Pin
Vaclav_18-Apr-20 5:23
Vaclav_18-Apr-20 5:23 
AnswerRe: Pass a struct as a function parameter or just use it as a global variable? Pin
k505418-Apr-20 6:17
mvek505418-Apr-20 6:17 
GeneralRe: Pass a struct as a function parameter or just use it as a global variable? Pin
Vaclav_18-Apr-20 6:30
Vaclav_18-Apr-20 6:30 
Questioncomputational cost of math functions Pin
Calin Negru17-Apr-20 5:06
Calin Negru17-Apr-20 5:06 
AnswerRe: computational cost of math functions Pin
OriginalGriff17-Apr-20 5:10
mveOriginalGriff17-Apr-20 5:10 
GeneralRe: computational cost of math functions Pin
Calin Negru17-Apr-20 6:58
Calin Negru17-Apr-20 6:58 
GeneralRe: computational cost of math functions Pin
leon de boer17-Apr-20 7:04
leon de boer17-Apr-20 7:04 
GeneralRe: computational cost of math functions Pin
Calin Negru17-Apr-20 8:14
Calin Negru17-Apr-20 8:14 
GeneralRe: computational cost of math functions Pin
Joe Woodbury17-Apr-20 10:43
professionalJoe Woodbury17-Apr-20 10:43 
GeneralRe: computational cost of math functions Pin
kalberts17-Apr-20 11:47
kalberts17-Apr-20 11:47 
GeneralRe: computational cost of math functions Pin
Joe Woodbury17-Apr-20 12:53
professionalJoe Woodbury17-Apr-20 12:53 
GeneralRe: computational cost of math functions Pin
kalberts17-Apr-20 13:03
kalberts17-Apr-20 13:03 

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.