For C programmers, hiding a pointer behind a
typedef
is widely considered bad style. In this special case, it might be justified because the pointer points to something unknown in C, so you could argue to provide just an "opaque handle". Still, strictly speaking, a "C++ struct" is different from a struct in C (think e.g. vtables), so I'd always pick the second option. —
Felix Palmen just now