Absolute beginner

Jorge jorge991733alpha at gmail.com
Fri Jan 13 13:34:03 PST 2012


Thanks for your answer but:

import std.stdio;
import std.conv;
void main()
{
	write("Insert number: ");
	string s = readln();
	auto i = to!int(s);
}

compiles but after i enter a number and press the enter key i get:

std.conv.ConvException at .\..\..\src\phobos\std\conv.d(1595): Can't
convert value
`
' of type string to type int
----------------
41DECC
41DD43
4027F3
402475
402D6C
402DB0
4029A7
4BBA79
----------------

what's wrong?


More information about the Digitalmars-d-learn mailing list