C++ design for multiple versions of same interface (enumerations / structures in header files)
问题 We are interfacing with an externally controlled program with defined headers containing enumerations, and structures. We want to be able to interface with multiple versions of this program with as little duplication of code as possible. Each version has the same general enums and structures, but with slight modifications over time. In the ideal setup we could just conditionally include the different versions of the same header (i.e. if interfacing with version 1 #include "version1\progDefs.h