• 5871阅读
  • 2回复

无符号字符在QT中如何定义? [复制链接]

上一主题 下一主题
离线zyt2006
 
只看楼主 倒序阅读 楼主  发表于: 2010-05-09
在linux下,QT界面设计完成之后,我定义了几个无符号字符的全局变量:
static uchar iRslt1,iRslt2,iRslt3,iRstl1;
make时候,提示:
fingermap.h:20: redefinition of `unsigned char iRslt1'
fingermap.h:20: `unsigned char iRslt1' previously declared here
fingermap.h:20: redefinition of `unsigned char iRslt2'
fingermap.h:20: `unsigned char iRslt2' previously declared here
fingermap.h:20: redefinition of `unsigned char iRslt3'
fingermap.h:20: `unsigned char iRslt3' previously declared here
fingermap.h:20: redefinition of `unsigned char iRstl1'
fingermap.h:20: `unsigned char iRstl1' previously declared here

这该如何解决?大虾们帮下忙。。。谢谢!
离线dbzhang800

只看该作者 1楼 发表于: 2010-05-09
头文件中不要放 定义,只放声明 !!!
(类定义、inline函数定义,const变量定义 除外)
[ 此帖被dbzhang800在2010-05-10 11:10重新编辑 ]
离线zyt2006
只看该作者 2楼 发表于: 2010-05-10
解决了。。。。谢谢~!
快速回复
限100 字节
 
上一个 下一个