UNIX Socket FAQ

A forum for questions and answers about network programming on Linux and all other Unix-like systems

You are not logged in.

#1 2011-10-20 02:06 PM

useless79
Member
Registered: 2011-10-10
Posts: 32

callback function in a struct

Hi,

Can any one give me a basic example and requirement for
using a callback function in a structure?
Googled but could not find which I can appreciate.


Thanks.....

Offline

#2 2011-10-21 12:50 PM

i3839
Oddministrator
From: Amsterdam
Registered: 2003-06-07
Posts: 2,239

Re: callback function in a struct

A callback function in a structure is just a function pointer.

If you want good examples of that, look at the Linux kernel source,
it's full with them. It's useful for implementing a given API, a bit like
inheritance in object oriented languages.

Offline

Board footer

Powered by FluxBB