P
philbo30
Silly question, please excuse my ignorance. This board is a wonderful
resource and I feel obligated to use it. In advance, thanks to all who
help out here.
Here's the situation:
Currently, a config file, "config.txt" has the following 3 numbers
inside it:
..124 .131 .104
The code line to load these numbers for use looks like this: [Works
great]
fscanf(config, "%lf %lf %lf", &abc, &def, &ghi);
However, I want my config file to look like this:
..124
..131
..104
and to use fscanf or fgets to read line by line and load to &abc, &def,
&ghi
This is for an embedded system, so most simple is most best. In
advance, thanks for any assistance. -Phil
resource and I feel obligated to use it. In advance, thanks to all who
help out here.
Here's the situation:
Currently, a config file, "config.txt" has the following 3 numbers
inside it:
..124 .131 .104
The code line to load these numbers for use looks like this: [Works
great]
fscanf(config, "%lf %lf %lf", &abc, &def, &ghi);
However, I want my config file to look like this:
..124
..131
..104
and to use fscanf or fgets to read line by line and load to &abc, &def,
&ghi
This is for an embedded system, so most simple is most best. In
advance, thanks for any assistance. -Phil