找回密碼
 立即注冊

QQ登錄

只需一步,快速開始

搜索
查看: 5177|回復: 2
打印 上一主題 下一主題
收起左側

#include “stdio.h”與#include<stdio.h>有什么區(qū)別

[復制鏈接]
跳轉(zhuǎn)到指定樓層
樓主
ID:82008 發(fā)表于 2015-6-4 15:52 | 只看該作者 回帖獎勵 |倒序瀏覽 |閱讀模式
用雙引號表示先在當前程序所在的目錄查找所包含的文件,一般在要包含自己寫的文件時使用
用尖括號表示先在系統(tǒng)目錄查找所包含的文件,一般在要包含系統(tǒng)頭文件時使用
/*
============================================================================
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>就會出錯了



分享到:  QQ好友和群QQ好友和群 QQ空間QQ空間 騰訊微博騰訊微博 騰訊朋友騰訊朋友
收藏收藏 分享淘帖 頂 踩
回復

使用道具 舉報

沙發(fā)
ID:147632 發(fā)表于 2016-11-13 14:17 | 只看該作者
樓主最后一句話有問題把。雖然先后順序不一樣但是最終實現(xiàn)的功能還是一樣的
回復

使用道具 舉報

板凳
ID:147632 發(fā)表于 2016-11-13 14:18 | 只看該作者
樓主最后一句話有問題把。雖然先后順序不一樣但是最終實現(xiàn)的功能還是一樣的
回復

使用道具 舉報

您需要登錄后才可以回帖 登錄 | 立即注冊

本版積分規(guī)則

小黑屋|51黑電子論壇 |51黑電子論壇6群 QQ 管理員QQ:125739409;技術交流QQ群281945664

Powered by 單片機教程網(wǎng)

快速回復 返回頂部 返回列表