久久久久久久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模板網!

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

相關文檔推薦

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 中動態設置標頭值)
主站蜘蛛池模板: 色久电影 | 91精品国产91久久久久久密臀 | 国产日韩av一区二区 | 黄色网络在线观看 | 久久国产精品亚洲 | 欧美日韩一二三区 | 亚洲一区二区三区视频在线 | 午夜精品视频在线观看 | 国产成人艳妇aa视频在线 | 激情五月综合 | 欧美精品一区二区三区在线 | 可以免费观看的av | 我想看一级黄色毛片 | 成人在线免费观看视频 | 精品欧美乱码久久久久久 | av特级毛片 | 欧美日韩高清免费 | 国产精品国产三级国产aⅴ原创 | 亚洲一区二区中文字幕 | 91九色porny首页最多播放 | 久久精品国产a三级三级三级 | 欧美一区二不卡视频 | 亚洲综合小视频 | 亚洲一区视频在线播放 | 久久久久久免费免费 | 精品免费国产一区二区三区四区 | 欧美日本韩国一区二区 | 91国在线| 91欧美精品| 另类视频区 | 国产精品久久久久久久白浊 | 成人精品鲁一区一区二区 | 国产高清精品在线 | 日本淫视频 | 性高朝久久久久久久3小时 av一区二区三区四区 | 狠狠躁躁夜夜躁波多野结依 | 亚洲欧美日韩在线一区二区 | 精品一二区 | 91偷拍精品一区二区三区 | 久久国产精品免费一区二区三区 | 亚洲 一区 |