码迷,mamicode.com
首页 >  
搜索关键字:ifdef    ( 750个结果
C/C++程序基础-标准头文件的结构
1:标准头文件有如下结构,请解释。 代码#ifndef _INCvxWorksh,#define _INCvxWorksh,#endif /* _INCvxWorksh*/的作用是防止该头文件被重复引用。 代码#ifdef _cplusplus的作用是表示当前使用的是C++编译器。 代码4~8行中的 ...
分类:编程语言   时间:2017-10-07 22:11:10    阅读次数:199
<C和指针---读书笔记16>
条件编译 符合条件,才进行编译。不符合条件的部分,直接忽略,根本不对其进行编译,能大大的提高效率。 主要有两种方式 : (1) #if expressition 看表达式结果。 (2) #ifdef xxx 看是否有过define xxx行为。 (1) #if expression 首先对这个表达式 ...
分类:其他好文   时间:2017-10-07 16:15:23    阅读次数:124
extern C的作用
#ifdef __cplusplus extern "C" { #endif //一段代码 #ifdef __cplusplus } #endif https://stackoverflow.com/questions/3789340/combining-c-and-c-how-does-ifdef ...
分类:其他好文   时间:2017-10-02 09:40:35    阅读次数:142
画一头猪
#if _MSC_VER>=1900 #include "stdio.h" _ACRTIMP_ALT FILE* __cdecl __acrt_iob_func(unsigned); #ifdef __cplusplus extern "C" #endif FILE* __cdecl __iob_f ...
分类:其他好文   时间:2017-09-30 17:53:38    阅读次数:294
stm32 向量表
今天在看代码的时候,看到有这么几行: //配置向量表 #ifdef VECT_TAB_RAM //向量表位于SRAM区 MY_NVIC_SetVectorTable(NVIC_VectTab_RAM, 0x0); #else //向量表位于CODE(FLASH)区 MY_NVIC_SetVector ...
分类:其他好文   时间:2017-09-27 23:12:14    阅读次数:288
C 语言中#if 0
在C语言中有条件编译指令,常见的有: #define 定义宏 #undef 取消已定义的宏 #if 如果给定条件为真,则编译下面代码 #ifdef 如果宏已经定义,则编译下面代码 #ifndef 如果宏没有定义,则编译下面代码 #elif 如果前面的#if给定条件不为真,当前条件为真,则编译下面代码 ...
分类:编程语言   时间:2017-09-13 13:15:05    阅读次数:136
For Memory Leak Debug
// for memory leak debug#ifdef _DEBUG _CrtSetBreakAlloc(4554);#endif ...
分类:其他好文   时间:2017-09-08 13:39:08    阅读次数:185
【转】C++可变参数列表处理宏va_list、va_start、va_end的使用
VA_LIST是在C语言中解决变参问题的一组宏他有这么几个成员: 1)va_list型变量: #ifdef _M_ALPHA typedef struct{ char* a0; /*pointertofirsthomedintegerargument*/ int offset; /*byteoffs ...
分类:编程语言   时间:2017-08-25 00:11:48    阅读次数:203
LPCTSTR LPCWSTR LPCSTR 含义
#ifdef UNICODE#define LPCTSTR LPCWSTR#else#define LPCTSTR LPCSTR#endif LPCTSTR A 32-bit pointer to a constant character string that is portable for Un ...
分类:其他好文   时间:2017-08-23 10:36:48    阅读次数:108
C++学习随笔
1.C与C++ NULL区别 #ifdef_cplusplus #define NULL 0 #else #define NULL ((void*)0) #endif 2.字节是内存编址的最小单位。 ...
分类:编程语言   时间:2017-08-21 00:18:07    阅读次数:234
750条   上一页 1 ... 17 18 19 20 21 ... 75 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!