【发布时间】:2015-03-31 18:43:39
【问题描述】:
我有以下类型定义。 pub 类型保存两个 int,pub_table 保存一个发布者数组和一个 int。
typedef pub{
int nodeid;
int tid
};
typedef pub_table{
pub table[TABLE_SIZE];
int last
};
然后在线pt.table[pt.last] = p; 我收到一个错误提示
" 错误:不完整的结构 ref 'table' 看到了 'operator: ='"
if
:: node_type == publisher ->
pub p;
p.nodeid = node_id;
p.tid = topic_id;
pt.last = pt.last + 1;
pt.table[pt.last] = p;
fi
很遗憾,我看不出那行有什么问题?
【问题讨论】: