我使用前向声明,但仍然得到 ERROR: 'link' does not name a type。为什么?
struct link;
struct node
{
link *head_link; <------- this is the error location
node *next_node;
};
struct link
{
link *next_link;
node *connect_node;
};
我使用前向声明,但仍然得到 ERROR: 'link' does not name a type。为什么?
struct link;
struct node
{
link *head_link; <------- this is the error location
node *next_node;
};
struct link
{
link *next_link;
node *connect_node;
};