Listing 1: tran_3.h and parse.h — Using conditional inclusion of files to test the various configurations shown in Figures 1-3

//tran_3.h
#ifndef __TRAN_3_H__
#define __TRAN_3_H__

#if defined VER_1
  #include <tran_b.h>
#elif defined VER_2
  #include <tran_b.h>
#elif defined VER_3
  #include <tran_b.h>
  #include <date.h>
#endif

struct tran_3 : public tran_b
{
  ~tran_3();
};

#endif


//parse.h
#ifndef __PARSE_H__
#define __PARSE_H__

#if defined VER_1
#elif defined VER_2
  #include <tran_3.h>
#elif defined VER_3
  #include <date.h>
#endif

struct parse
{
  ~parse();
};

#endif
— End of Listing —