​原文​

module Console;
//模块名,

import std.string;
import core.sys.windows.windows;

class Console {
public:
HANDLE hIn;
HANDLE hOut;

this(HANDLE hIn, HANDLE hOut) {
this.hIn = hIn;
this.hOut = hOut;
}
}
//这里名字不要取Console.d

服务器:

module Server;

import std.string;
import core.sys.windows.windows;
//import Console;
import console;
//原改成下面的小写.

class Server : Console {
this(HANDLE hIn, HANDLE hOut) {
super(hIn, hOut);
}

~this() {
// Delete object;
}
}
void main()
{
Server s;
}

模块名,不要与类名冲突.这里主要是​​文件名​​​不要冲突.​​窗口​​​下,​​Console​​​直接重命名为​​console​​​,还不行,先要不一样,再改成小写,如中间名为​​cons​​.