Message-ID: <385573FD.88C57AF@ufu.br> Date: Mon, 13 Dec 1999 19:32:31 -0300 From: bcc14 AT ufu DOT br (Bacharelado Curso Ciencia Computacao-14) X-Mailer: Mozilla 4.5 [en] (WinNT; I) X-Accept-Language: en MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Re: Input? References: <3855596D DOT 15459DEE AT pepparkakor DOT demon DOT nl> Content-Type: multipart/alternative; boundary="------------B9EE104BCE361AA0208E71CE" Reply-To: djgpp AT delorie DOT com --------------B9EE104BCE361AA0208E71CE Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit There are several ways in which you can store a value in a variable, but for the ANSI C (also works for C++) the easiest way is the command scanf(). The sintax for the scanf is the following: scanf("%type",&variable); where type is the type of the value and of the variable deaclared earlier. the type are defined as : d : Decimal/Integer s : String f : float d : double ... Go check the scanf command on the tutorials on the Net. You will find lots of things... SPY Roger wrote: > Hi everyone! > > I have one question! I know a command in Basic,but I can't use it in > C++.Could anyone tell me how I make a input-command,so I can for example > write in a name! > > Thanks.. --------------B9EE104BCE361AA0208E71CE Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit There are several ways in which you can store a value in a variable, but for the ANSI C (also works for C++) the easiest way is the command scanf().
The sintax for the scanf is the following:

  scanf("%type",&variable);

  where type is the type of the value and of the variable deaclared earlier.

  the type are defined as :
   d : Decimal/Integer
   s : String
   f : float
  d : double
...

  Go check the scanf command on the tutorials on the Net. You will find lots of things...

  SPY

Roger wrote:

Hi everyone!

I have one question! I know a command in Basic,but I can't use it in
C++.Could anyone tell me how I make a input-command,so I can for example
write in a name!

Thanks..

--------------B9EE104BCE361AA0208E71CE--