`
- 浏览:
491733 次
- 性别:
- 来自:
北京
-
#include "stdio.h" 与 #include <stdio.h> 的区别
突然看到有的文件包含用#include "文件名",有的用#include <文件名>.于是自习看了下,在这和大家分享下。
文件包含include有三种形式的控制指令
1:#include <文件名>
将把该行替换为文件名指定的文件的内容。文件名不能包含> 或换行符。
如果文件名包含字符 " ' \ 或 /* 则行为没有定义。
预处理器将在某些特定的位置查找指定的文件
如:在tc下 Options-> Directories-> Include directories:
可以设置include目录 (如:c:\TURBOC2\INCLUDE)
2:#include "文件名 "
首先从原文件的位置开始搜索指定文件,如果没有找到指定的文件则按第一种的方式处理。
如果文件名包含字符 ' \ 或 /* 则行为没有定义。可以使用字符>
3:#include 记号序列
它将按照扩展普通文本的方式扩展记号序列进行解释。记号序列必须被解释为 <..> 或 ".. "
两种形式之一,然后再按照上述方式进行处理。
#define SSS <stdio.h>
#include SSS
void main()
{
printf( "Hello!\n ");
}
#include文件可以嵌套。
分享到:
Global site tag (gtag.js) - Google Analytics
相关推荐
#include <stdio.h> #include <stdlib.h> #include <assert.h> #include <string.h> typedef struct matrix { int row; int col; } matrix; typedef struct minCost { int cost; int mid; } minCost; minCost** ...
水仙花c语言#include<stdio.h> #include <math.h> void main() /*主函数*/ { int num, a,b,c; /* 定义a,b,c为整形函数 */ for(a=1;a<=9;a++) /*a是百位上数字,范围是1~9*/
#include<stdio.h> #include<malloc.h> #define ok 1 #define error 0 #define overflow -1 #define LIST_INIT_SIZE typedef int ElemType; typedef int Status; typedef struct LNode{ ElemType data; struct ...
#include <stdio.h> #include <stdlib.h> #include <malloc.h> #include <string.h> typedef struct Student//学生信息 { signed short id; char name[11]; char sex[7]; signed short age; char telNum...
发生的爱的 安达市大大 免费的桑拿房,上的发生的,能否,是发生了罚款是否 使得房价司法是否 是否适当方式的是按时打发似的发射的共同回顾房间号 好风光好多人 人啊打发打发的是官方的风格的
#include "stdio.h" #include "dos.h" #include "conio.h" #include "bios.h" #include "stdlib.h" #include "math.h" #ifdef __cplusplus #define __CPPARGS ... #else #define __CPPARGS #endif #...
C语言程 停车场管理问题 #include<stdio.h> #include<stdlib.h> struct { char status; int num; int time; }a; /*命令的结构*/ typedef struct{ int num; int time; }Element; struct { Element *base; Element *...
#include<stdio.h>#include<malloc.h>#include<string.h>#include<stdlib.h>#define NULL 0#define LEN sizeof(struct student)struct student{ int num; char name[10]; int score; struct student *next;};int n;...
# include <stdio.h> # include<stdlib.h> char stu_no[10][10]; int c_math[10],c_en[10],c_computer[10],point[10],average[10]; int i,j,max; char c; void input() { for(i=0;i<=9;i++) /*输入学生...
华为各个职位笔试题 #include <stdio.h> #include <iostream.h> #include <ctype.h> #include <string.h> void fun(char a[]) { int i,j,m=0,s=0,strl; strl=strlen(a); char temp[30]={0}; for(i=strl-1;i>=0;i...
rfgerhbcjksdhfiuhawergbfjkdfbvjkdbkjfgiuashreuifhweh
#include<stdio.h> #include<stdlib.h> #include<malloc.h> #include <stdlib.h> #include<string.h> #define stack_init_size 100 #define stackincrement 10 char ch,ch1; int i,j,k,n,m;
表头文件 #include<unistd.h> 定义函数 unsigned int alarm(unsigned int seconds); 函数说明 alarm()用来设置信号SIGALRM在经过参数seconds指定的秒数后传送给目前的进程。如果参数 seconds 为0,则之前设置的闹钟...
#include<stdio.h> #include<stdlib.h> #include<conio.h> #define getpch(type) (type*)malloc(sizeof(type)) #define NULL 0 #define TIME 2//时间片长度 typedef struct pcb{//进程管理块 char name[10];...
#include <stdio.h> #include <string.h> #define N 50 /*叶子结点数*/ #define M 2*N-1 /*树中结点总数*/ typedef struct { char data[5]; /*结点值*/ int weight; /*权重*/ int parent; /*双亲结点*/ int ...
#include<stdio.h> #include<string.h> #include<conio.h> #include<alloc.h> int r; struct student { int number; char name[9]; float score[4]; float avescore; }; typedef struct link { struct ...
这是一个小游戏实现猜数字的小游戏,采用的语言是C++。
#include<stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include<stdlib.h> #include <sys/ioctl.h> #include <sys/soundcard.h> #include <termios.h> #include <unistd.h> int ...
#include stdio.md