Click here to Skip to main content
15,915,857 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: how to call a user defined dialog from the menu Pin
Didaa6-Jan-03 20:54
Didaa6-Jan-03 20:54 
Questionhow to place a toolbar in a floating controlbar? Pin
ashxly6-Jan-03 19:59
ashxly6-Jan-03 19:59 
AnswerRe: how to place a toolbar in a floating controlbar? Pin
Rage7-Jan-03 3:24
professionalRage7-Jan-03 3:24 
GeneralRe: how to place a toolbar in a floating controlbar? Pin
ashxly8-Jan-03 20:50
ashxly8-Jan-03 20:50 
Generalchecking filesystems and partiiton information Pin
r i s h a b h s6-Jan-03 19:23
r i s h a b h s6-Jan-03 19:23 
GeneralRe: checking filesystems and partiiton information Pin
admins6-Jan-03 20:02
admins6-Jan-03 20:02 
GeneralRe: checking filesystems and partiiton information Pin
Abbas_Riazi6-Jan-03 20:31
professionalAbbas_Riazi6-Jan-03 20:31 
GeneralAdding a new dialog to an MFC Sample Pin
RaulGonzalez6-Jan-03 17:55
RaulGonzalez6-Jan-03 17:55 
GeneralRe: Adding a new dialog to an MFC Sample Pin
xxhimanshu6-Jan-03 18:15
xxhimanshu6-Jan-03 18:15 
GeneralProgrammatically changing the folder access permissions Pin
abhinarulkar6-Jan-03 17:52
abhinarulkar6-Jan-03 17:52 
GeneralRe: Programmatically changing the folder access permissions Pin
xxhimanshu6-Jan-03 18:08
xxhimanshu6-Jan-03 18:08 
GeneralRe: Programmatically changing the folder access permissions Pin
Mike Nordell7-Jan-03 0:33
Mike Nordell7-Jan-03 0:33 
GeneralRe: Programmatically changing the folder access permissions Pin
abhinarulkar7-Jan-03 18:18
abhinarulkar7-Jan-03 18:18 
GeneralRe: Programmatically changing the folder access permissions Pin
DaveZ7-Jan-03 4:57
DaveZ7-Jan-03 4:57 
GeneralOdd Question Pin
Nick Parker6-Jan-03 17:39
protectorNick Parker6-Jan-03 17:39 
GeneralRe: Odd Question Pin
Abbas_Riazi6-Jan-03 20:36
professionalAbbas_Riazi6-Jan-03 20:36 
GeneralMenu Bar Pin
pranavamhari6-Jan-03 14:29
pranavamhari6-Jan-03 14:29 
GeneralRe: Menu Bar Pin
xxhimanshu6-Jan-03 17:54
xxhimanshu6-Jan-03 17:54 
GeneralFrom CWnd to CFrameWnd: menu items appear disabled! Pin
Mr.Freeze6-Jan-03 13:43
Mr.Freeze6-Jan-03 13:43 
GeneralWorking now, but don't know why! Pin
Mr.Freeze6-Jan-03 17:44
Mr.Freeze6-Jan-03 17:44 
GeneralRe: From CWnd to CFrameWnd: menu items appear disabled! Pin
Michael Dunn6-Jan-03 21:24
sitebuilderMichael Dunn6-Jan-03 21:24 
QuestionFunction Pointer? Pin
Aidman6-Jan-03 11:16
Aidman6-Jan-03 11:16 
Hi all, Smile | :)

Is it possible to declare a function pointer outside function arguments? I mean like declaring a pointer as a separate variable which isn’t an argument and can change the function it is pointing at, assuming that whatever function it points at always has the same arguments. Like this code for example. Please note that I know this following code doesn’t compile, I just want to explain my question in code, it’s always a lot easier.

<br />
void realfunc(void){ // declaring a normal function with no arguments<br />
      return;<br />
}<br />
<br />
int main(){<br />
      void (*funcptr)(void); // declaring "function pointer" with no arguments<br />
      *funcptr=realfunc; // "function pointer" pointing at a normal function with same argument settings<br />
      funcptr(); // calling the function that the "function pointer" is pointing at<br />
      return 0;<br />
}<br />


So is there something similar to this code? In other words is it possible to do something like this? Confused | :confused:


Aidman » over and out
AnswerRe: Function Pointer? Pin
Stefan Pedersen6-Jan-03 11:35
Stefan Pedersen6-Jan-03 11:35 
AnswerRe: Function Pointer? Pin
Chris Richardson6-Jan-03 11:38
Chris Richardson6-Jan-03 11:38 
GeneralAdvanced Function Pointer? Pin
Aidman6-Jan-03 13:02
Aidman6-Jan-03 13:02 

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.