This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

empty struct

0

i saw an empty struct as struct pref_module; defined in epanpref.h, what is the significance of such structures, i have not come accross such structures.

asked 10 Jun '11, 07:25

sagu072's gravatar image

sagu072
35232428
accept rate: 0%


One Answer:

2

It's not an empty struct, it is a struct whose contents are not visible to users of prefs.h. The full structure definition of the structure is in prefs-int.h .

Such structures are generally used to make them opaque to the users (so they can't view or change the contents). See the Wikipedia article on such things.

[Update] Don't forget to drop by and Accept this answer if it answered your question.

answered 10 Jun '11, 08:22

JeffMorriss's gravatar image

JeffMorriss ♦
6.2k572
accept rate: 27%

edited 09 Mar '12, 07:04