Read parameters from .dat file into C++? -
There are a lot of resources online about how to get input / output from text files in C ++, but I '
For example, I have a file that is a group of standards Reads like:
NbProducts = 10; NB Plates = 3; NBiption = 6; MaxPosition = 3; Demand = [6907,14342,36857,40961,61129,69578,72905,91977,93969 97336]; How do I drag it as a variable in the C ++ program? Thank you very much for helping in advance.
Here's a way to do this:
You may need to strip the surrounding white location after splitting. You will need to parse the value after reading it, especially for your array.
An alternative will store your data in something like JSON or XML and will use the current parser to read it.