作者:
dzwei (Cout<< *p << \n ;)
2018-04-29 16:55:22剛好最近有碰到,
目前也還在學習中,
剛好有點小心得,
有錯誤還懇請版上的大師們指正,
謝謝!
提個關鍵字跟板友分享一下
『opaque pointer』
這跟C++的pimpl有87%像
以下code舉例於維基百科
//=========================================
/* obj.h */
struct obj;
/*
* The compiler considers struct obj an incomplete type.
* Incomplete types can be used in declarations.
*/
size_t obj_size(void);
void obj_setid(struct obj *, int);
int obj_getid(struct obj *);
//