linux c++学习笔记0630

来源:互联网 发布:全国省市区sql 编辑:程序博客网 时间:2024/05/01 08:52

         main函数文件调用其他文件夹文件函数。

1)调用当前文件夹下其他目录文件

如:#include "util/headU.h"


2)调用当前文件夹同级目录文件

#include "../H1/human.h"

3)调用当前文件夹上一级目录文件

#include "../../Lib/test.h"


编译g++ -o TestMain TestMain.cpp ./util/headU.cpp ../H1/human.cpp ../../Lib/test.cpp

0 0
原创粉丝点击