delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/03/13:19:24

Message-ID: <016001bdbf01$e15bbc40$0a1f1bc4@enterprise-z>
From: "=?iso-8859-1?Q?Jorge_Iv=E1n_Meza_Mart=EDnez?=" <jimeza AT usa DOT net>
To: "Oliver Batchelor" <batch AT netaccess DOT co DOT nz>, <djgpp AT delorie DOT com>
Subject: Re: input read function !!!!?????? and string to float !!!!!!!!!??????
Date: Mon, 3 Aug 1998 11:52:07 -0500
MIME-Version: 1.0

>and the user types in a string on the keyboard. like 1234.  It shows it on
>the screen as the user types it and after the  string hello = "1234"

have you used fgets ( ... )  from "stdio.h" ?

>also does anyone have a function to convert a string number to a float
>variable ??

strtod ( ... ) from "string.h"; converts from string ( char[] ) to double.

Jorge Iván Meza Martínez
jimeza AT usa DOT net
http://members.xoom.com/THP


-----Original Message-----
From: Oliver Batchelor <batch AT netaccess DOT co DOT nz>
Newsgroups: comp.os.msdos.djgpp
To: djgpp AT delorie DOT com <djgpp AT delorie DOT com>
Date: Domingo, 02 de Agosto de 1998 07:15 p.m.
Subject: input read function !!!!?????? and string to float !!!!!!!!!??????


>Does any one know of a function  that I could use to input a string ??
>
>eg.
>char hello[50];
>
>readln(hello);         (as it is in pascal)
>
>and the user types in a string on the keyboard. like 1234.  It shows it on
>the screen as the user types it and after the  string hello = "1234"
>
>
>
>thanks,
>Oliver Batchelor
>
>

- Raw text -


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