久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

Eclipse C++ 包括來自我的源文件夾的頭文件

Eclipse C++ including header file from my source folder(Eclipse C++ 包括來自我的源文件夾的頭文件)
本文介紹了Eclipse C++ 包括來自我的源文件夾的頭文件的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

限時送ChatGPT賬號..

總的來說,我對 C++ 和 Eclipse 還很陌生,所以如果我遺漏了一些相當明顯的東西,我深表歉意.

I'm pretty new to C++ and Eclipse in general so I apologise if I'm missing something fairly obvious.

我遇到的問題是我試圖在我的一個源文件中包含一個頭文件,但它們位于我的項目目錄中的不同文件夾中.我不知道我應該如何包括他們.我上傳了一張圖片,顯示了我要突出顯示的頭文件的問題.

The problem I'm having is that I'm trying to include a header file in one of my source files but they're in different folders in my project directory. I have no idea how I should be including them. I've uploaded an image showing my problem with the header file I want to include highlighted.

如果有人能告訴我應該使用什么#include"語句,那就太好了.

If someone could tell me what '#include' statement I should be using them that would be brilliant.

謝謝!

推薦答案

有幾個不同的選項可以完成這項工作.最簡單的是將 #include 改為

There are a couple of different options to make this work. Simplest is to change the #include to

#include "../Statistics/Statistics.h"

這將在沒有任何其他修改的情況下工作.但是,如果您移動任一文件,或以某種方式更改兩者之間的相對路徑,這將中斷.

This will work without any other modifications. However, if you move either file, or somehow change the relative path between the two, this will break.

或者,您可以將 Statistics 文件夾的路徑添加到編譯器的包含文件搜索路徑中.右鍵單擊項目名稱,選擇 Properties -> C/C++ Build -> Settings,然后找到編譯器的包含文件路徑選項.對于 g++,它是 -I.添加這將使 #include 語句像您當前擁有的那樣工作.

Alternately, you can add the path to the Statistics folder to your compiler's include file search path. Right click on the project name, select Properties -> C/C++ Build -> Settings and then find the includes files path option for your compiler. For g++, it is -I<path/to/include/folder>. Adding this will make the #include statement work as you currently have it.

與第二個非常相似的選項是將 src 文件夾的路徑(而不是 Statistics 文件夾)添加到包含搜索路徑.在這種情況下,您必須將語句更改為

A very similar option to the second one is to add the path to the src folder (instead of the Statistics folder) to the includes search path. In this case, you'll have to change the statement to

#include "Statistics/Statistics.h"

這篇關于Eclipse C++ 包括來自我的源文件夾的頭文件的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯(lián)網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯(lián)系我們刪除處理,感謝您的支持!

相關文檔推薦

How can I make a horizontal sliding calendar in android eclipse?(如何在 android eclipse 中制作水平滑動日歷?)
Open WebSocket connection with authentication cookie(使用身份驗證 cookie 打開 WebSocket 連接)
jax-ws change Content-type to Content-Type because server is hyper sensitive(jax-ws 將 Content-type 更改為 Content-Type 因為服務器是超敏感的)
Eclipse CDT not building project on header file change(Eclipse CDT 沒有在頭文件更改時構建項目)
Multiple editable rows in JTable header(JTable 標題中的多個可編輯行)
How to dynamically set header value in JSP(如何在 JSP 中動態(tài)設置標頭值)
主站蜘蛛池模板: 玖玖玖av | 免费黄色大片 | 日韩激情网| 久久精品二区亚洲w码 | 精品国产乱码久久久久久果冻传媒 | 看片91 | 国产一区在线免费 | 自拍偷拍av| 日本一本在线 | 国产免费一区二区 | 美国黄色毛片 | 日韩在线小视频 | 五十女人一级毛片 | 在线精品亚洲欧美日韩国产 | 一级毛片视频在线 | 欧美日韩国产一区二区 | 国产丝袜一区二区三区免费视频 | av在线二区 | 亚洲精品欧美 | av网站免费观看 | 欧美日韩国产一区二区 | 欧美a在线观看 | 日韩1区| 亚洲成人午夜电影 | 日韩色视频 | 日韩av美女电影 | 精品成人免费一区二区在线播放 | 欧美日韩中文字幕在线 | 欧美一区二区在线观看 | 免费不卡av| 国产精品成人久久久久 | 亚洲国产精品久久久 | 九九久久精品 | 欧美mv日韩mv国产网站91进入 | 久久午夜精品福利一区二区 | 国产精品有限公司 | 91欧美| 中文字幕欧美一区 | 亚洲欧美中文日韩在线v日本 | 国产激情自拍视频 | 国产激情一区二区三区 |