The first proposal with #define will not work, as #define are evaluated at build time and you mix this with run time data 'flag'.
Second proposal looks reasonable, although c, cpp syntax needs improvement.
Second proposal looks reasonable, although c, cpp syntax needs improvement.
The compilers do a good job in reducing code size. Your job is to write understandable code, observe the DRY principle and implement good architecture.But i want to reduce the code, if can be possible.
Statistics: Posted by ghp — Tue Apr 02, 2024 6:38 am