编译错误:multiple types in one declaration

来源:互联网 发布:在线源码查看 编辑:程序博客网 时间:2024/06/06 02:33

在编译cpp工程时,出现编译错误:multiple types in one declaration。

报错如下:

error: multiple types in one declaration

代码中该行是一个class定义的最后一行。

在网上查了下:

1、在该定义后面没有;

2、重复定义

由于在该头文件中使用了#ifndef #define #endif语句,不存在重复定义,往前查,发现是前面struct globalStat的定义结束后缺少分号,加上后,编译通过。

0 0
原创粉丝点击