|
-
March 23rd, 2009, 12:29 PM
#7
Re: common #define through all header files and libraries
 Originally Posted by StudentFS
Problem is that option A and B are very similar, only minor modifications but in multiple places. To keep two copies of the code is too big headache.
Oh, absolutely you should avoid code duplication. I just feel that using #define should be restricted to OS- or compiler-dependent differences. Algorithmic differences almost always can be encapsulated more cleanly using other approaches.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|