討論串[問題] include
共 6 篇文章
內容預覽:
不好意思我順便問一個新手問題喔.... 假設工作目錄改成這個:. /home/user. /home/user/proj/file1.h. /home/user/proj/file1.c. /home/user/other_src/file2.c. /home/user/other_src/file
(還有62個字)
內容預覽:
我在 ubuntu 10.04 上用 gcc compile, 這是. 就一個下載的大 project, xxx.tar.gz, 增加一些小的額外的功能. 假設工作目錄, Makefile 在. /home/user. /home/user/proj/file1.h. /home/user/proj
(還有348個字)
內容預覽:
//a.h. #ifndef A_H. #define A_H. class B;. class A. {. public:. A();. void print(){}. private:. B* _b;. };. #endif. //b.h. #ifndef B_H. #define B_H. c
(還有249個字)
內容預覽:
遇到兩個.h檔必須要互相include對方時發生的問題. //a.h. #ifndef A_H. #define A_H. #include "b.h". class A. {. A(){_b = new B(this);}. void print(){}. private:. B* _b;. };
(還有364個字)