Why I could not cast string to int?

David Nadlinger see at klickverbot.at
Thu Feb 2 07:58:50 PST 2012


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().

Hope this helps,
David


More information about the Digitalmars-d-learn mailing list