Hi.To create int-double array I have to pre-initialize the auto array:
import std.stdio;
import std.algorithm;
void main() {
auto s = [5.31, 6];
s = s.remove(0, 1);
double k;
readf("%s", &k); // 17.32
s ~= k, s ~= 5, s ~= 1.125;
writeln(s); // [17.32, 5, 1.125]
}
I can do it something like this (without initialization)?
import std.stdio;
void main() {
auto s = []; // wrong
double k;
readf("%s", &k); // 17.32
s ~= k, s ~= 5, s ~= 1.125;
writeln(s); // [17.32, 5, 1.125]
}
