2012-02-07 34 views

回答

3

的一種方法是使用預處理器刪除評論並通入使用process substitutiondiff這...

diff -uwB <(g++ -E left.cpp) <(g++ -E right.cpp) 

當然,這將在文件中拉你#include和擴展您的#define宏也是。如果他們沒有改變,這應該是相當可讀的。

我已經傳給diff開關是:

-w --ignore-all-space Ignore all white space. 
-B --ignore-blank-lines Ignore changes whose lines are all blank. 
-u -U NUM --unified[=NUM] Output NUM (default 3) lines of unified context. 
相關問題