d类名不要与模块名相同
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.
 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号