linux bool不识别,解决vs不识别bool类型的问题

本文介绍了解决VisualAssistX在不同版本的Visual Studio中无法正确识别bool类型成员的问题。通过在特定文件中添加预处理指令,可以确保VisualAssistX使用默认的bool类型而非自定义类型,从而恢复正常的功能。
摘要由CSDN通过智能技术生成

Visual Studio 2012 or newer

C:\Users\%USERNAME%\AppData\Local\Microsoft\VisualStudio\\Extensions\\Misc\StdAfxVa.h

C:\Users\%USERNAME%\AppData\Local\Microsoft\VisualStudio\\Extensions\\Misc\StdAfx.h

Visual Studio 2010

C:\Users\%USERNAME%\AppData\Local\Microsoft\VisualStudio\10.0\Extensions\Whole Tomato Software\Visual Assist X\\Misc\StdAfxVa.h

or

C:\Users\%USERNAME%\AppData\Local\Microsoft\VisualStudio\10.0\Extensions\\Misc\StdAfxVa.h

Visual Studio 2010 using Windows XP

Copy:

C:\Documents and Settings\%USERNAME%\Local Settings\Application Data\Microsoft\VisualStudio\10.0\Extensions\Whole Tomato Software\Visual Assist X\\Misc\StdAfxVa.h

or

C:\Users\%USERNAME%\AppData\Local\Microsoft\VisualStudio\10.0\Extensions\\Misc\StdAfxVa.h

Visual Studio 2008 or older

Copy:

C:\Program Files\Visual Assist X\Misc\StdAfxVa.h

Visual Studio 2008 or older, using Windows XP

Copy:

C:\Program Files\Visual Assist X\Misc\StdAfxVa.h

打开以上文件,添加如下代码

#define bool bool

或者

#define bool BOOL (测试下来,这个比较有效一点,StdAfxVa.h和StdAfx.h两个文件都加一下)

#define bool BOOL

#define BOOL bool

这个方法比较有效一点

添加后需要选择VASSISTX->Visual Assist Options -> 打开对话框 ->Performance ->Rebuild 然后重启VS 重新构建VA提示

Class members of type bool are not recognised

In rare cases class members of type bool will not be recognised as members, they won't be colored as variables, and they won't be suggested in listboxes. This can be caused by using a C library that defines its own bool type, for compilers that don't already support this type. If this happens, the solution is to add the line:

#define bool bool

to the "va_stdafx.h" file, which is used to help our parser understand complex code. This will tell VA to use the default bool type, and not the library definition.

If this does not work, you might need to use the line:

#define bool BOOL

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值