码迷,mamicode.com
首页 > 编程语言 > 详细

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

时间:2016-10-18 18:19:03      阅读:269      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!