首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VC/MFC >

if define ,end if用法有关问题!多谢

2012-01-16 
if define ,end if用法问题!谢谢!请问这段怎么翻译啊??谢谢大家了!#ifdefined(_WIN64)#ifndef_WIN32/*alot

if define ,end if用法问题!谢谢!
请问这段怎么翻译啊??谢谢大家了!
#if   defined(_WIN64)
#         ifndef   _WIN32
                /*
                        a   lot   of   code   (mistakenly)   uses   #ifdef   _WIN32   to   either   test   for
                        Windows   or   to   test   for   !__WIN16__,   so   we   must   define   _WIN32   for
                        Win64   as   well   to   ensure   that   the   existing   code   continues   to   work.
                  */
#               define   _WIN32
#       endif   /*   !_WIN32   */

#       ifndef   __WIN64__
#               define   __WIN64__
#       endif   /*   !__WIN64__   */
#endif   /*   _WIN64   */

[解决办法]
#if defined(_WIN64) //如果定义了_WIN64(如果是64位系统)
# ifndef _WIN32 //如果没有定义_WIN32
/*
a lot of code (mistakenly) uses #ifdef _WIN32 to either test for
Windows or to test for !__WIN16__, so we must define _WIN32 for
Win64 as well to ensure that the existing code continues to work.
*/
# define _WIN32 //那么定义_WIN32
# endif /* !_WIN32 */ //_WIN32的定义结束

# ifndef __WIN64__ //如果没有定义__WIN64__
# define __WIN64__ //那么定义__WIN64__
# endif /* !__WIN64__ */ //__WIN64__定义结束
#endif /* _WIN64 */ //_WIN64定义结束

热点排行