デフォルトコンストラクタを消去しているはずなのにエラーが出ます。
//一部省略
class Window
{
private:
Window() = delete;
Window(const Window &) = delete;
Window &operator=(const Window &) = delete;
public:
Window(const std::string &title = "DxLib", int width = 640, int height = 480)
{
DxLib::SetGraphMode(width, height, 0x10);
DxLib::ChangeWindowMode(TRUE);
DxLib::SetOutApplicationLogValidFlag(FALSE);
DxLib::SetWindowText(title.c_str());
if(DxLib::DxLib_Init() == -1)
{
throw DxError("Error in DxLib_Init");
}
DxLib::SetDrawScreen(DX_SCREEN_BACK);
}
~Window()
{
DxLib::DxLib_End();
}
};
int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
Window window;
return 0;
};
test1.cpp:19:39: エラー: 'DxError' was not declared in this scope
test1.cpp: 関数 'int WinMain(HINSTANCE, HINSTANCE, LPSTR, int)' 内:
test1.cpp:30:9: エラー: オーバーロードされた 'Window()' の呼び出しは曖昧です
test1.cpp:30:9: 備考: 候補:
test1.cpp:11:2: 備考: Window::Window(const string&, int, int)
test1.cpp:7:2: 備考: Window::Window() <削除済み>
make[1]: *** [test1.o] Error 1
使用コンパイラはMinGWです。