Why does hello world not compile in safe?

Freddy via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Nov 28 23:24:55 PST 2014


----
import std.stdio;
@safe:
void main()
{
	writeln("Edit source/app.d to start your project.");
}

----
source/app.d(5): Error: safe function 'D main' cannot call system
function 'std.stdio.writeln!(string).writeln'


More information about the Digitalmars-d-learn mailing list