九月丫头 2013-06-20 04:02 采纳率: 100%
浏览 6062
已采纳

error C2632: 'char' followed by 'char' is illegal

把原来的C文件中的函数封装成一个类成员函数,在.h头文件中。运行就提示一些错误,不知道怎么解决。

c:\program files\microsoft sdks\windows\v7.0a\include\windef.h(154): error C2632: 'char' followed by 'char' is illegal
3>c:\program files\microsoft sdks\windows\v7.0a\include\windef.h(154): warning C4091: 'typedef ' : ignored on left of 'unsigned char' when no variable is declared
3>c:\program files\microsoft sdks\windows\v7.0a\include\windef.h(155): warning C4114: same type qualifier used more than once
3>c:\program files\microsoft sdks\windows\v7.0a\include\windef.h(155): error C2632: 'short' followed by 'short' is illegal
3>c:\program files\microsoft sdks\windows\v7.0a\include\windef.h(155): warning C4091: 'typedef ' : ignored on left of 'unsigned short' when no variable is declared
3>c:\program files\microsoft sdks\windows\v7.0a\include\windef.h(172): error C2632: 'int' followed by 'int' is illegal
3>c:\program files\microsoft sdks\windows\v7.0a\include\windef.h(172): warning C4091: 'typedef ' : ignored on left of 'int' when no variable is declared
3>c:\program files\microsoft sdks\windows\v7.0a\include\winnt.h(331): error C2632: 'char' followed by 'char' is illegal

windef.h中的定义
typedef unsigned long DWORD;
typedef int BOOL;
typedef unsigned char BYTE;

  • 写回答

1条回答

  • 蜗牛love天空 2019-10-15 15:51
    关注

    可以把代码贴出来,方便解答。
    关注一下,类型的定义冲突。如果引入了第三方库的(c/c++)代码,有可能,已经对基础数据类型做了重定义。混合使用,这样会导致类型冲突。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog