Type: Note
make 2>&1 | tee build.log不一定要是 make
是執行什麼東西就可以用
0: stdin, 1: stdout, 2: stderr
"2>&1": 將標準錯誤 重新定向到 標準輸出
"tee build.log": tee 將同時輸出到 控制台 和 build.log
make 2>&1 | tee build.log不一定要是 make
# makefile gen: mkdir -p clean clean: rm -rf clean執行 "make gen ; make clean"
# makefile gen: mkdir -p clean clean: rm -rf clean .PHONY: clean就可以成功執行了
class Personality;
class Human{
Personality p;
}
class Personality{
string name;
}
因為它必須先計算 Human class 的 memory 大小
class Personality;
class Human{
Personality *p;
}
class Personality{
string name;
}
在使用 include 時要注意這點
//Human.h
#ifndef HUMAN_H_
#define HUMAN_H_
#include "project.h"
class Human{
Personality p;
}
#endif
//Personality.h
#ifndef PERSONALITY_H_
#define PERSONALITY_H_
#include "project.h"
class Personality{
string name;
}
#endif
//project.h #include "Human.h" #include "Personality.h"這就會導致上述提到的不完全型態