www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/07/13/13:08:04

From: "Steve Johnston" <s DOT johnston AT coventry DOT ac DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Reading in a configuration file
Date: Thu, 13 Jul 2000 16:53:30 +0100
Organization: Coventry University Computing Services
Lines: 20
Message-ID: <8kkotd$lrp$1@sunbeam.coventry.ac.uk>
NNTP-Posting-Host: n434-14.mis.coventry.ac.uk
X-Trace: sunbeam.coventry.ac.uk 963503853 22393 194.66.45.190 (13 Jul 2000 15:57:33 GMT)
X-Complaints-To: abuse AT coventry DOT ac DOT uk
NNTP-Posting-Date: 13 Jul 2000 15:57:33 GMT
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hi

I've written an application and want to be able to read in a configuration
file such as

1.0    #Displacement along x axis
0.0    #Displacement along y axis
0.0    #Displacement along z axis

where everything beyond # is to be ignored in the read command. The program
reads in the values fine if I remove my comments but I could do with them
for making changes to the config file later. At the moment I use fscanf()
for the obtaining the values I want - is there any way I can get it to jump
to the next line in the file once its read in one floating point value?

Thanx

Steve


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019