I\'m getting a compile error (MS VS 2008) that I just don\'t understand. After messing with it for many hours, it\'s all blurry and I feel like there\'s something very obvio
p->pfn is a function pointer. You need to use * to make it function. Change to
(*(p->pfn))(val)