[GNHLUG] Silly C/C++ question...

Thomas Charron twaffle at gmail.com
Mon Dec 1 16:17:09 EST 2008


On Mon, Dec 1, 2008 at 4:13 PM,  <bruce.labitt at autoliv.com> wrote:
>>On Mon, Dec 1, 2008 at 3:30 PM,  <bruce.labitt at autoliv.com> wrote:
>>> I am sure I will kick myself when I find out the answer, but...
>>>  line 2: four doubles separated by commas
>>>  line 3: \n
>>* * * STUFF DELETED
>>> fscanf(fp, "%d%d%d%d", &fstart1, &fend1, &M1, &dt1);     // get
>>fstart,
>>> fend, number of doppler slices & dt
>>  Where's the commas getting cleared?
> It would appear that is the problem, hmm, I left my K&R at home.  Do you
> have a link to a K&R clone or a reference to the string command that would
> be useful?  It looks like strtok would work, if I can figure it out...
> Jeesh, I'm liking python more and more...

  :-P  Google fscanf example ?  :-D  "%f,%f,%f,%f" would probrably
work, depends on how 'potentially bad' the data could be, really.

-- 
-- Thomas


More information about the gnhlug-discuss mailing list