Mail Archives: djgpp/1999/12/13/18:47:20
--------------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
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
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().
<br>The sintax for the scanf is the following:
<p> scanf("%<i>type</i>",&<i>variable</i>);
<p> where <i>type </i>is the type of the value and of the variable
deaclared earlier.
<p> the type are defined as :
<br> d : Decimal/Integer
<br> s : String
<br> f : float
<br> d : double
<br>...
<p> Go check the scanf command on the tutorials on the Net. You will
find lots of things...
<p> SPY
<p>Roger wrote:
<blockquote TYPE=CITE>Hi everyone!
<p>I have one question! I know a command in Basic,but I can't use it in
<br>C++.Could anyone tell me how I make a input-command,so I can for example
<br>write in a name!
<p>Thanks..</blockquote>
</html>
--------------B9EE104BCE361AA0208E71CE--
- Raw text -