当前位置:网站首页>【 genius_platform software platform development 】 : seventy-six vs the preprocessor definitions written cow force!!!!!!!!!!(in the other groups conding personnel told so cow force configuration to can
【 genius_platform software platform development 】 : seventy-six vs the preprocessor definitions written cow force!!!!!!!!!!(in the other groups conding personnel told so cow force configuration to can
2022-08-05 02:48:00 【随意的风】
vsAwesome way to write a preprocessor definition!!!!
1.问题概述
- Today, the small partners in the group are debugging the algorithm interface,Always crashes at the algorithm interface,发现vs提示信息为vector too long…The result algorithm guy told to set the precompiler definition
_HAS_ITERATOR_DEBUGGING=0
Cancel the macro definition.我擦,这是什么骚操作,It's okay to play like this,It looks like there is a problem,As a result, the definition of the macro cannot be cancelled in order to prove that this is the case,It is hereby verified;
2. main.cpp源代码(vs2017环境,其他vs环境都可以):
#ifdef _HAS_ITERATOR_DEBUGGING
#define x_1 1
#pragma message ("#define x_1 1")
#endif
#ifdef _HAS_ITERATOR_DEBUGGING
#define y_1 1
#pragma message ("#define y_1 1")
#endif
#include <iostream>
int main()
{
//int x = 0;
#ifdef _HAS_ITERATOR_DEBUGGING
{
printf("#ifdef _HAS_ITERATOR_DEBUGGING\n");
printf("x_z = %d\n", _HAS_ITERATOR_DEBUGGING);
printf("x_1 = %d\n", x_1);
printf("y_1 = %d\n", y_1);
}
#endif
if (_HAS_ITERATOR_DEBUGGING == 0)
{
printf("if (_HAS_ITERATOR_DEBUGGING == 0)\n");
printf("x_z = %d\n", _HAS_ITERATOR_DEBUGGING);
printf("x_1 = %d\n", x_1);
printf("y_1 = %d\n", y_1);
}
if (_HAS_ITERATOR_DEBUGGING == 1)
{
printf("if (_HAS_ITERATOR_DEBUGGING == 1)\n");
printf("x_z = %d\n", _HAS_ITERATOR_DEBUGGING);
printf("x_1 = %d\n", x_1);
printf("y_1 = %d\n", y_1);
}
if (_HAS_ITERATOR_DEBUGGING == 2)
{
printf("if (_HAS_ITERATOR_DEBUGGING == 2)\n");
printf("x_z = %d\n", _HAS_ITERATOR_DEBUGGING);
printf("x_1 = %d\n", x_1);
printf("y_1 = %d\n", y_1);
}
// printf("%d\n", vtkBooleanMacro(x,=,1));
std::cout << "Hello World!\n";
getchar();
}
3. The preprocessor is defined as_HAS_ITERATOR_DEBUGGING=0
3.1 See recompilelog
- This macro is predefined by the editor
_HAS_ITERATOR_DEBUGGING 为 0
,但是该_HAS_ITERATOR_DEBUGGING
still belong to the predefined state;
3.2 查看运行结果
#ifdef _HAS_ITERATOR_DEBUGGING
Judgments are predefined,或者使用if(_HAS_ITERATOR_DEBUGGING == 0/1)
This kind of shit is rare,Can't get it to cancel_HAS_ITERATOR_DEBUGGING
的定义
4. The preprocessor is defined as_HAS_ITERATOR_DEBUGGING=1
4.1 See recompilelog
- This macro is predefined by the editor
_HAS_ITERATOR_DEBUGGING 为 1
,但是该_HAS_ITERATOR_DEBUGGING
still belong to the predefined state;
4.1 查看运行结果
5. The preprocessor is defined as_HAS_ITERATOR_DEBUGGING=2
5.1 See recompilelog
- 编译阶段直接报错,如图;
6. 总结
- As long as it is defined in the preprocessor interface
_HAS_ITERATOR_DEBUGGING
宏,That is, the editor will define the macro during the editing phase.This macro will generally not be executed again=赋值操作
(Must be a cognitive error,I want to cancel the definition of this macro); - If you really want to play tricks、A mess of abnormal settings,Then it can only be set to 0/1(This is rarely used);And it can only be used in the program
if(_HAS_ITERATOR_DEBUGGING == xxxx)
Judgment in other forms,#ifdef _HAS_ITERATOR_DEBUGGING
always valid,Predefined macros; - I want to cancel the setting of a macro,配置成
_HAS_ITERATOR_DEBUGGING=0
It does not work to cancel the macro definition;Really want to cancel or remove the configuration of this macro;
边栏推荐
- UOS系统下ksql应用缺少动态库”libtinfo.so.5“问题
- sql server 安装提示用户名不存在
- 1667. Fix names in tables
- 人人都在说的数据中台,你需要关注的核心特点是什么?
- 【Daily Training】1403. Minimum Subsequence in Non-Increasing Order
- DAY22: sqli-labs shooting range clearance wp (Less01~~Less20)
- 百日刷题计划 ———— DAY2
- mysql没法Execute 大拿们求解
- Syntax basics (variables, input and output, expressions and sequential statement completion)
- QT MV\MVC structure
猜你喜欢
Study Notes-----Left-biased Tree
【解密】OpenSea免费创造的NFT都没上链竟能出现在我的钱包里?
lua学习
The Tanabata copywriting you want has been sorted out for you!
View handler 踩坑记录
leetcode 15
Beidou no. 3 short message terminal high slope in open-pit mine monitoring programme
Tencent Cloud [Hiflow] New Era Automation Tool
The 20th day of the special assault version of the sword offer
word column notes
随机推荐
mysql tree structure query problem
Cloud Native (32) | Introduction to Platform Storage System in Kubernetes
Everyone in China said data, you need to focus on core characteristic is what?
HDU 1114: Piggy-Bank ← The Complete Knapsack Problem
RAID磁盘阵列
C student management system head to add a student node
627. 变更性别
QT MV\MVC结构
Chinese characters to Pinyin
正则表达式,匹配中间的某一段字符串
Industry case | insurance companies of the world's top 500 construction standards can be used to drive the business analysis system
Study Notes-----Left-biased Tree
The 20th day of the special assault version of the sword offer
J9 Digital Currency: What is the creator economy of web3?
继承关系下构造方法的访问特点
1527. 患某种疾病的患者
[ROS] (10) ROS Communication - Service Communication
通过模拟Vite一起深入其工作原理
优炫数据库的单节点如何转集群
02 [Development Server Resource Module]