首页 > 编程语言 > 详细

C++中 <iso646.h>头文件

时间:2016-10-18 18:16:02      阅读:128      评论:0      收藏:0      [点我收藏+]
1 #include<iostream>
2 #include<iso646.h>
3 using namespace std;
4 int main(){
5     int i = 5,j = 6,k=7;
6     if(i<j and j<k)cout<<"i<j and j<k"<<endl;
7     if(i<j or j<k)cout<<"i<j or j<k"<<endl;
8 }

iso646.h  头文件中包含许多宏定义

#define and &&
#define and_eq &=
#define bitand &
#define bitor |
#define compl ~
#define not !
#define not_eq !=
#define or ||
#define or_eq |=
#define xor ^
#define xor_eq ^=

 

所以可以使用一些英文单词来表示逻辑符。

C++中 <iso646.h>头文件

原文:http://www.cnblogs.com/teng-IT/p/5974025.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!