Top "Function-pointers" questions

A function pointer is a pointer to a function, which can be stored in a variable.

How does the C code that prints from 1 to 1000 without loops or conditional statements work?

I've found C code that prints from 1 to 1000 without loops or conditionals : But I don't understand how it works. Can …

c function-pointers
Generic function pointers in C

I have a function which takes a block of data and the size of the block and a function pointer …

c function-pointers abstraction
Difference between capture and passing an argument in lambda functions

I understand the lambda function and the purpose of it in c++ 11. But i do not understand the difference between "…

c++ c++11 lambda function-pointers
How to get return value from a function called which executes in another thread in TBB?

In the code: #include <tbb/tbb.h> int GetSomething() { int something; // do something return something; } // ... tbb::tbb_thread(…

c++ multithreading return-value function-pointers tbb
Where are member functions stored for an object?

I'm experimenting with C++ to understand how class/structures and their respective objects are laid out in memory and I …

c++ memory function-pointers pointer-to-member
C++ Conversion operator for converting to function pointer

I'm been grinding my head against an idea that is simple enough in my head, but I can't figure out …

c++ function-pointers conversion-operator
What does ((void (*)())buf)(); mean?

I am solving a binary exploitation challenge on picoCTF and came across this piece of code: ((void (*)())buf)(); where buf …

c function pointers function-pointers
If-statement vs function pointer

The goal is to change the behaviour in an event loop, depending on whether a checkbox is toggled on or …

c performance if-statement function-pointers data-oriented-design
Why the size of a pointer to a function is different from the size of a pointer to a member function?

Isn't a pointer just an address? Or I'm missing something? I tested with several types of pointers: pointers to any …

c++ pointers function-pointers member-function-pointers
boost::bind with null function pointers

If the function pointer embedded in a boost::bind return object is NULL/nullptr/0, I need to take action other …

c++ boost function-pointers bind boost-bind