delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/09/03/17:05:28

Message-ID: <37D0081D.67B1095F@res.raytheon.com>
From: ingrama <ingrama AT res DOT raytheon DOT com>
X-Mailer: Mozilla 4.51 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Newbie Question - Convert string to numerical value
References: <37d32cc7 DOT 4183133 AT news DOT inet DOT tele DOT dk>
Date: Fri, 03 Sep 1999 13:40:45 -0400
NNTP-Posting-Host: 138.127.172.127
X-Complaints-To: news AT icg DOT raytheon DOT com
X-Trace: bos-service2.ext.raytheon.com 936380451 138.127.172.127 (Fri, 03 Sep 1999 12:40:51 CDT)
NNTP-Posting-Date: Fri, 03 Sep 1999 12:40:51 CDT
Organization: Raytheon Company
Lines: 26
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

look into using
fgets & sscanf



Lasse Krogh Thygesen wrote:

> c++ related newbie question.
>
> I need to convert a string which contain a number to a numerical
> value. Can anyone tell me which include file and command to use.
>
> The string I need to convert is filled with value coming from a text
> file on the disk. The file is opened and a value is read with the word
> operator (?) into the string. The value should be an integer, but the
> word operator won't read the string into an integer.
>
> Is this nonsense ?
>
> --- [www.lkt.person.dk] --- [www.maverick.subnet.dk] ---

--
/*  The opinions stated in this message are in no way intended to
represent the views of my employer */


- Raw text -


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