Why I could not cast string to int?
xancorreu
xancorreu at gmail.com
Thu Feb 2 08:21:24 PST 2012
Al 02/02/12 16:58, En/na David Nadlinger ha escrit:
> On 2/2/12 1:35 PM, xancorreu wrote:
>> In this code, how can I cast the args[0] string to int for computing
>> factorial(args[0])?
>
> std.conv.to!int(…) or parse().
to!int gives me this error:
$ ./factorial 222
Factorial requires a number
parse() where is the doc?
Thanks in advance,
Xan.
>
> Hope this helps,
> David
More information about the Digitalmars-d-learn
mailing list