Program exited with code 1
Andrey
saasecondbox at yandex.ru
Thu Apr 19 08:13:00 UTC 2018
Hello,
I wrote a small test code with WinApi:
----------------------------------------------------
import core.runtime;
import std.utf;
import core.sys.windows.windows;
import core.sys.windows.wingdi;
class Test
{
public this() nothrow
{
}
}
extern(Windows)
int WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR lpCmdLine, int
nCmdShow)
{
new Test(); // error is here
return 0;
}
----------------------------------------------------
When I run it, there is an error: Program exited with code 1.
If I comment "new Test();" - no error happens. Why? How to create
instances of classes?
DMD v2.077.1, Windows 10.
More information about the Digitalmars-d-learn
mailing list