用双引号表示先在当前程序所在的目录查找所包含的文件,一般在要包含自己写的文件时使用
用尖括号表示先在系统目录查找所包含的文件,一般在要包含系统头文件时使用
/*
============================================================================
Name : rr.c
Author : ff
Version :
Copyright : Your copyright notice
Description : Hello World in C, Ansi-style
============================================================================
*/
#include <stdio.h>
#include <stdlib.h>
#include "c.h"
extern int j;
int main(void) {
s.age=1;
//kk=1;
kk();
puts("!!!Hello World!!!"); /* prints !!!Hello World!!! */
printf("%d",j);
return EXIT_SUCCESS;
}
/*
* c.h
*
* Created on: 2012-7-31
* Author: root
*/
#ifndef C_H_
#define C_H_
struct student
{
int num;
char name[128];
char password[32];
int age;
int class;
int math;
}s;
//extern student s;
int kk(void)
{
puts("!!!Hello World123!!!");
return EXIT_SUCCESS;
}
#endif /* F_H_ */
如果上面把#include "c.h"改成#include <c.h>就会出错了
|