I've heard that you can set values in your c++ program during compilation using g++'s -DN flag. Can anybody explain how? Thank you
Answer 1:
-DXXX
标志就像是加入#define XXX
。 所以-DN=2
是一样#define N 2
。
你可以使用此标志编译过程中传递值。
参考:
- GCC预处理程序选项
文章来源: How to pass values during compilation with g++ using -DN flag