My project consists of processing multiple data files, but only one at a given time. The data files have similar names with the "case number" changing. The code itself dependes on the specific data file I am using. Specifically, let's say I have a macro contains the case (data file) number:
// Cases are 200, 203, 209
#define CASE 200
Now, I need to #include the relevant data file and additional header and definition files that have the case number in their names.
I tried to automate the selection of the correct file names by using the macro CASE in the #include directives. I tried various approaches. However the compiler keeps complaining that it expects a file name agter the #include directive. What I need is something like:
#define DATA_FILE data_for_case_##CASE##.dat
My current solution is to use an #if CASE == XXX directive tree, for conditional compilation, but this is very non-flexible.