魚骨頭的雲端圖書館's Archiver

mhfo 發表於 2018-6-25 16:16

include 路徑的語法

include 路徑的語法
[url]http://www.microchip.com.tw/modules/newbb/viewtopic.php?post_id=57518[/url]

請問這個是指向哪個路徑?
#include "./USB/usb.h"
請問前面加兩個逗點是什麼意思?
#include "../USB/usb_device_local.h"

ANS:  . 專案所在路徑
       .. 專案所在的上一層路徑


"xxxx.h" : 用引號 " " 的標示為目前 Project 所在的路徑。
<p18f4520.h> : 用 < > 所標示的路徑是指 C compiler 內定的路徑。

頁: [1]

Powered by Discuz! Archiver 7.0.0  © 2001-2009 Comsenz Inc.