我在尝试构建代码时遇到此错误。错误出现在有一个type_def的行中。如何解决这个错误?
typedef long sbsize_t;
typedef unsigned long bsize_t;
请帮帮我。
答案 0 :(得分:3)
g ++ 4.8会生成此错误:
#define sbsize_t
#define bsize_t
typedef long sbsize_t;
typedef unsigned long bsize_t;
main.cpp:15:9: error: declaration does not declare anything [-fpermissive]
typedef long sbsize_t;
^
main.cpp:16:18: error: declaration does not declare anything [-fpermissive]
typedef unsigned long bsize_t;
所以也许你的代码中有这样的定义吗?