I am currently working in an aleady developed C++ project. The existing files are the following:-main.cpp-HydroModel.cpp-ODESys.cpp-HydroModel.hpp-ODESys.hpp-ODESysSol.hppIn the file HydroModel.hpp there are some constants defined in the namespace config, for example namespace config  {      const unsigned int dim = 40;      const unsigned int NaN = 10101; ...  }This file is being included in main.cpp, ODESysSol.hpp and HydroModel.cpp. These constants are being used over and over in those files.However, these constants are not always the same, as they change depending on the case study analyzed. The idea is to take out these variables into a txt file in order to avoid compiling each time that the case study changes.I know it would be easy if the variables are being defined inside a function or the main(), but so far I didn't find a way to do it in the preprocessor.Is it possible to load the txt file and define the variables inside the namespace or I have to rewrite everything that is related to those variables?
Load values from txt to variables in namespace
c++;namespace
Change your header file HydroModel.hpp tonamespace config {     extern unsigned int dim;     extern unsigned int NaN;}In HydroModel.cpp writenamespace config {     unsigned int dim;     unsigned int NaN;}That way, you won't have to rewrite much of your existing code.Now all what remains to you is to implement a function which initializes those variables from the text file. Afterwards make sure this function is called when the program starts, before any other code tries to access the variables. 