cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
function pointer
function pointer
Dec 27, 2013 at 10:14pm UTC
JAI SINGH
(100)
two things I did'nt get till now
Q->1 what is the actual use of function pointer ?
Q->2 what is use of passing function as an argument to another function ?
Dec 27, 2013 at 10:33pm UTC
kbw
(9488)
See qsort().
http://pubs.opengroup.org/onlinepubs/007908799/xsh/qsort.html
Dec 27, 2013 at 10:38pm UTC
Cubbi
(4774)
Q->1 what is the actual use of function pointer ?
Implementation-defined, but normally the same as the size of a pointer to object.
1
2
3
4
5
#include <iostream>
int
main() { std::cout <<
sizeof
(
void
(*)()) <<
'\n'
; }
I get 8 (on 64-bit platform)
Now the size of a member function pointer is another story...
Topic archived. No new replies allowed.