![]() |
|
#1
|
|||
|
|||
passing a function pointer in to a function (c++)Can I Pass a function pointer to a function?
something like: CPP / C++ / C Code:
Last edited by LuciWiz : 03-Dec-2005 at 07:40.
Reason: Please insert your C++ code between [c++] & [/c++] tags
|
|
#2
|
||||
|
||||
Passing and returning a function pointer with a function using C++Sven,
We can pass function pointer to a function. We can return function pointer from a function. // This is what your code tells. You have to modify your code a little bit. Here is a simple example using classes, that explains passing a function pointer and also returning a function pointer... CPP / C++ / C Code:
And sven, dont forget to put semicolon in the end of the class declaration. Best Regards, Paramesh. __________________
Don't walk in front of me, I may not follow. Don't walk behind me, I may not lead. Just walk beside me and be my friend. |
Recent GIDBlog
First week of IA training by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [Include] Doubly-linked List | dsmith | C Programming Language | 6 | 14-Apr-2006 13:12 |
| [Tutorial] Function Pointers | aaroncohn | CPP / C++ Forum | 4 | 17-Feb-2006 11:33 |
| Pointer Usage in C++: Beginner to Advanced | varunhome | CPP / C++ Forum | 0 | 19-Aug-2005 09:25 |
| [Tutorial] Pointers in C (Part II) | Stack Overflow | C Programming Language | 0 | 27-Apr-2005 17:36 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The