Why I could not cast string to int?

xancorreu xancorreu at gmail.com
Thu Feb 2 08:25:35 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().

Sorry, if condition was wrong. conv.to!int is perfect!

Thanks,
>
> Hope this helps,
> David



More information about the Digitalmars-d-learn mailing list