#include的应用练习

简介: 【6月更文挑战第22天】#include的应用练习。

题目:#include 的应用练习。
程序分析:无。
程序源代码:
test.h 文件代码如下:

define LAG >

define SMA <

define EQ ==

主文件代码:

include "test.h"

include

int main()
{
int i=10;
int j=20;
if(i LAG j)
printf("%d 大于 %d \n",i,j);
else if(i EQ j)
printf("%d 等于 %d \n",i,j);
else if(i SMA j)
printf("%d 小于 %d \n",i,j);
else
printf("没有值。\n");
return 0;
}
以上实例输出结果为:

10 小于 20

相关文章
|
9月前
|
编译器 C语言
#include
#include
174 0
makefile include 使用介绍
makefile include 使用介绍
145 0
|
4月前
|
编译器 C++
#include<> 与#include ""的区别
在C++中,`#include &lt;&gt;` 和 `#include &quot;&quot;` 都用于包含头文件,但使用场景不同。`#include &lt;&gt;` 用于包含系统标准库头文件,编译器会在标准库路径中查找;而 `#include &quot;&quot;` 用于包含用户自定义的头文件,编译器会优先在当前项目目录中查找。
|
4月前
include 的应用练习
include 的应用练习。
36 7
|
8月前
|
编译器 C语言 C++
C++中.h和.hpp文件有什么区别?
C++中.h和.hpp文件有什么区别?
|
9月前
|
测试技术
常用字符串函数 #include<string.h>与#include<stdio.h>
常用字符串函数 #include<string.h>与#include<stdio.h>
97 1
|
9月前
|
存储
include函数
【2月更文挑战第15天】include函数。
94 2
|
9月前
#include 的应用练习
#include 的应用练习。
61 3
|
编译器 C++
解决iostream.h在vc2008下不能被include
解决iostream.h在vc2008下不能被include
101 0