您的位置:首页 > 其它

结构体内可以包含自身的指针(链表实现方法)或 引用 但不可以包含自身变量即递归 (因为这样一来结构体大小就无法确定了)

2014-05-29 10:29 736 查看
例子:
CCScheduler.cpp
中一段代码

typedef struct _listEntry
{
struct _listEntry *prev, *next;
CCObject *target; // not retained (retained by hashUpdateEntry)
int priority;
bool paused;
bool markedForDeletion; // selector will no longer be called and entry will be removed at end of the next tick
} tListEntry;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐