2012-02-07 64 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.