Conversion problem.

H. S. Teoh hsteoh at quickfur.ath.cx
Tue Jun 25 16:44:28 UTC 2019


On Tue, Jun 25, 2019 at 12:08:07PM +0000, Den_d_y via Digitalmars-d-learn wrote:
> Hello! Here I am again, with my problem ... In my program, I cannot manage
> to convert from "double" to "int". Here is the code:
[...]

Did you try this?

	import std.conv : to;

	double d = ...;
	int i = d.to!int;


T

-- 
People tell me I'm stubborn, but I refuse to accept it!


More information about the Digitalmars-d-learn mailing list