Subject Archive for function pointer

How to use Function Pointers in C++
Category: Programming April 7, 2013 Tags: , ,

Function pointers in C++ have a somewhat obtuse syntax and similarly confusing semantics. This tutorial will lay out the syntax and semantics for the most common use cases in a way that is comprehensible and easy to get to grips with. The description here is by no means exhaustive but in my experience it should cover about 90% of the things you would want to do as long as you are making appropriate use of Boost.bind and Boost.function or their std equivalents (as you should be). read on
Function pointers for thread communication
Category: Programming December 8, 2010 Tags: , , , ,

When you program with thread objects (a thread bound to a class instance) in C++ you inevitably run into the need for an effective way of extracting information from them. At this point the dilemma becomes; do you ask the thread for the information or do you get the thread to report it to you? […] read on
How to use Boost.Bind
Category: Programming December 8, 2010 Tags: , , , , ,

Function pointers are a powerful programming tool but are extremely difficult to use with only the standard C++ syntax at your disposal. Boost.Bind steps into this breach, transforming the syntax from obtuse and confusing to intuitive and accessible. This tutorial will walk you through the basics of Boost.Bind in a way that will have you […] read on
How to use Boost.Function
Category: Programming December 8, 2010 Tags: , , , , ,

Specifying variables of function pointer type in standard C++ has a downright filthy syntax and rightly strikes confusion into the hearts of programmers everywhere. Boost.Function provides a different syntax which is far superior in every way. This tutorial shows how to use Boost.Function with examples of common tasks and covers all of the main features […] read on