0

std::のようなオブジェクトにを追加するのを忘れた場合によく見られるエラーが表示されますstring。この場合、それは私自身namespacex. 具体的なエラーは次のとおりです。

Error 59 error C2143: syntax error : missing ';' before '*' e:\cppworkspace\xengine\xengine\code\include\x\graphics\graphics.h 32 1 XEngine

Error 60 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int e:\cppworkspace\xengine\xengine\code\include\x\graphics\graphics.h 32 1 XEngine

グラフィックヘッダーファイル:

#ifndef GRAPHICS_H
#define GRAPHICS_H

#include "x/x.h"
#include "x/graphics/d3dwrapper.h"

namespace x
{
    class Graphics
    {
    public:
        Graphics() {}
        ~Graphics(){}

        bool Init(int32 width, int32 height, bool fullscreen, HWND hwnd);
        void Destroy();
        void Update();
        void Render();
    protected:
    private:
        Graphics(const Graphics& other) {}

        D3DWrapper* m_d3d; // ERROR IS HERE
    };
}
#endif // GRAPHICS_H

D3DWrapper ヘッダー ファイル:

#ifndef D3DWRAPPER_H
#define D3DWRAPPER_H

#include "x/x.h"
#include "x/system/system.h"

namespace x
{
    class D3DWrapper
    {
    public:
        D3DWrapper();
        ~D3DWrapper() {}

        bool Init(int32 width, int32 height, bool fullscreen, HWND hwnd);
        void Release();
        bool InitScene();

        void BeginScene(Color color);
        void EndScene();

        inline ID3D11Device* GetDevice() { return m_device; }
        inline ID3D11DeviceContext* GetDeviceContext() { return m_deviceContext; }

    protected:
    private:
        D3DWrapper(const D3DWrapper& other) {}

        ID3D11Device* m_device;
        ID3D11DeviceContext* m_deviceContext;
        IDXGISwapChain* m_swapChain;
        ID3D11RenderTargetView* m_renderTargetView;
    };
}


#endif // D3DWRAPPER_H

このエラーが発生するコードの何が問題なのかを理解できないようですので、助けていただければ幸いです。

4

0 に答える 0