标题:
#include “stdio.h”与#include<stdio.h>有什么区别
[打印本页]
作者:
huyun
时间:
2015-6-4 15:52
标题:
#include “stdio.h”与#include<stdio.h>有什么区别
用双引号表示先在当前程序所在的目录查找所包含的文件,一般在要包含自己写的文件时使用
用尖括号表示先在系统目录查找所包含的文件,一般在要包含系统头文件时使用
/*
============================================================================
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>就会出错了
作者:
盆123
时间:
2016-11-13 14:17
楼主最后一句话有问题把。虽然先后顺序不一样但是最终实现的功能还是一样的
作者:
盆123
时间:
2016-11-13 14:18
楼主最后一句话有问题把。虽然先后顺序不一样但是最终实现的功能还是一样的
欢迎光临 (http://www.51hei.com/bbs/)
Powered by Discuz! X3.1