Hello,
I want to create an input file for my program in which I store all of my input data (constants etc.).
Something of this kind:
------------
Input parameters
------------
boxlengthX 1.0
boxlengthY 1.0
boxlengthZ 1.0
radius (nm) 10
Temperature (K) 298
etc.
which scan function allows the various functions of the program to go and look for the necessary input from this file.
And what function should I use to get the calculated values (outcome of several functions in the program) in a nicely ordered output file?
I have been using scanf before but I don't think that will do the trick here. If you could just point out a better function, that would be a great help.
Thank you very much!
Tom
I want to create an input file for my program in which I store all of my input data (constants etc.).
Something of this kind:
------------
Input parameters
------------
boxlengthX 1.0
boxlengthY 1.0
boxlengthZ 1.0
radius (nm) 10
Temperature (K) 298
etc.
which scan function allows the various functions of the program to go and look for the necessary input from this file.
And what function should I use to get the calculated values (outcome of several functions in the program) in a nicely ordered output file?
I have been using scanf before but I don't think that will do the trick here. If you could just point out a better function, that would be a great help.
Thank you very much!
Tom
Comment