Dmd doesn't like tuples or me :>

Enjoys Math via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Dec 11 17:41:24 PST 2015


import std.stdio;
import std.typecons;

int main(string[] argv)
{
	auto value = Tuple(5, 6.7, "hello");
	assert(value[0] == 5);
	assert(value[1] == 6.7);
	assert(value[2] == "hello");

     writeln("Hello D-World!");
     return 0;
}

// Standard example copied from the docs

VisualD (VS 2015) Output:
------ Build started: Project: ConsoleApp1, Configuration: Debug 
Win32 ------
Building Debug\ConsoleApp1.exe...
Error: cannot find source code for runtime library file 'object.d'
        dmd might not be correctly installed. Run 'dmd -man' for 
installation instructions.
        config file: C:\D\dmd2\windows\bin\sc.ini
import path[0] = C:\D\dmd2\windows\bin\..\..\src\phobos
import path[1] = C:\D\dmd2\windows\bin\..\..\src\druntime\import
Building Debug\ConsoleApp1.exe failed!
Details saved as 
"file://C:\MyProjects\D\ConsoleApp1\ConsoleApp1\Debug\ConsoleApp1.buildlog.html"
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped 
==========


More information about the Digitalmars-d-learn mailing list