找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 4844|回复: 2
收起左侧

#include “stdio.h”与#include<stdio.h>有什么区别

[复制链接]
ID:82008 发表于 2015-6-4 15:52 | 显示全部楼层 |阅读模式
用双引号表示先在当前程序所在的目录查找所包含的文件,一般在要包含自己写的文件时使用
用尖括号表示先在系统目录查找所包含的文件,一般在要包含系统头文件时使用
/*
============================================================================
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>就会出错了



回复

使用道具 举报

ID:147632 发表于 2016-11-13 14:17 | 显示全部楼层
楼主最后一句话有问题把。虽然先后顺序不一样但是最终实现的功能还是一样的
回复

使用道具 举报

ID:147632 发表于 2016-11-13 14:18 | 显示全部楼层
楼主最后一句话有问题把。虽然先后顺序不一样但是最终实现的功能还是一样的
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|51黑电子论坛 |51黑电子论坛6群 QQ 管理员QQ:125739409;技术交流QQ群281945664

Powered by 单片机教程网

快速回复 返回顶部 返回列表