#include <stdio.h>
#include <stdlib.h>

typedef struct 
{
        int a;
} abc;

struct tcp_server
{
     struct abc b;
};

int main( int argc, char** argv )
{

}

用gcc编译的时候会出现:
test22.c:11: error: field ‘b’ has incomplete type
abc 本来就是 struct { int a}; 的别名,然后使用的时候又加了struct.所以出现了这个问题。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-19
  • 2022-12-23
  • 2022-12-23
  • 2021-09-16
  • 2021-09-06
猜你喜欢
  • 2021-10-18
  • 2021-08-08
相关资源
相似解决方案