Dear all. I need to have something like the input file, where I could change some variable value, and run the program. There are a lot of variables, and it would take a lot of time to write a code, where program reads values, and defines them to some variables. Therefore I am wondering if there some procedure, to have some file, outside the compiled program, where I define some values, and when the program is executed, the values are redefined according to written in the file. It would be especially nice to have something like header file with defined global variables.
Thanks, but the question was not about simple file reading. Let me explain more clearly. If there is a way to have a file, which looks similar to this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
//some explanatory text on variable1
//some explanatory text on variable2
//some explanatory text on variable3
//some very long explanation
//variable4 meaning in program
and when program starts, it assigns variables with values written. Very similar to having a header with global variables which can be edited without the need of recompiling. If to use standard "input/output with files" procedures, it will take a lot of time and lots of lines coding, also not easy input. In case if you would like to add variable, or enlarge explanation you will have to change the program itself.