Thread: passing a function pointer

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Hail to the king, baby. Akkernight's Avatar
    Join Date
    Oct 2008
    Location
    Faroe Islands
    Posts
    717

    passing a function pointer (NEW QUESTION ASKED)

    Hello again!

    I'm working on a project where I need a function to take the address of another function as its argument, then in the function I set a pointer to the address, like here:
    Code:
    virtual void SetFrameFunc( bool &FrameFunc_() ) { pFrameFunc = &FrameFunc_(); }
    This doesn't give me an error, still I don't know how to use pFrameFunc now... Also, I want to do recursion to the function which address was passed to SetFrameFunc, does anyone have any ideas on how to do this?

    Thanks in advance!
    Last edited by Akkernight; 03-21-2009 at 06:25 PM.
    Currently research OpenGL

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. sorting number
    By Leslie in forum C Programming
    Replies: 8
    Last Post: 05-20-2009, 04:23 AM
  2. Replies: 9
    Last Post: 12-25-2007, 05:01 AM
  3. Game Pointer Trouble?
    By Drahcir in forum C Programming
    Replies: 8
    Last Post: 02-04-2006, 02:53 AM
  4. pointers
    By InvariantLoop in forum C Programming
    Replies: 13
    Last Post: 02-04-2005, 09:32 AM
  5. Passing a function pointer to a templated type
    By skorman00 in forum C++ Programming
    Replies: 2
    Last Post: 04-13-2004, 08:31 PM