Category "function-pointers"

Passing a pointer to a class member function as a parameter

I have written a small program where I am trying to pass a pointer to member function of a class to another function. Can you please help me and where I am goin

How to best design function that takes an unary predicate

I'm implementing a simple timeout-class which calls a given function when time runs out. However I'm scratching my head on how to make the function constructor

Calling C++ member functions via a function pointer

How do I obtain a function pointer for a class member function, and later call that member function with a specific object? I’d like to write: class Dog

Why are function pointers and data pointers incompatible in C/C++?

I have read that converting a function pointer to a data pointer and vice versa works on most platforms but is not guaranteed to work. Why is this the case? Sho

What is the purpose of std::function, and how to use it?

It is necessary to me to use std::function but I don't know what the following syntax means. std::function<void()> f_name = []() { FNAME(); }; What is

how to call function pointer in a struct?

I am working with the xinu embedded operating system in c. I created a new header file and declared a struct: struct callout { uint32 time; /* Time of d

how to call function pointer in a struct?

I am working with the xinu embedded operating system in c. I created a new header file and declared a struct: struct callout { uint32 time; /* Time of d