Unbekannter Syntax-Fehler



  • hallo ihr lieben,
    ich habe ein eher komisches problem.
    ich habe eine class die heisst D3DApp. allerdings ist da ein fehler bei der definierung der klasse :

    #ifndef D3DAPP_H
    #define D3DAPP_H
    #include <windows.h>
    #include <string>
    #include "d3dUtil.h"
    
    class D3DApp
    {
    public:
    	//CONSTRUCTOR
    	D3DApp(HINSTANCE hInstance);
    	//
    
    	//DESTUCTOR
    	virtual ~D3DApp();
    	//
    
    	//MAIN APPLICATION LOOP
    	int Run();
    	//
    
    	//FRAMEWORK
    	virtual bool Init();
    	virtual void Update(float dt) = 0;
    	virtual void Render() = 0;
    	void Shutdown();
    	LRESULT MsgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
    
    protected:
    	//ATTRIBUTES
    	HWND           m_hAppWindow;
    	HINSTANCE      m_hAppInstance;
    	unsigned int   m_uiClientWidth;
    	unsigned int   m_uiClientHeight;
    	std::string    m_sAppTitle;
    	DWORD          m_WindowStyle;
    	float          m_FPS;
    	bool           m_bHandleDeviceLost;
    	bool           m_bDeviceLost;
    	//
    
    	//DIRECTXATTRIBUTES
    	IDirect3D9*			     m_pDirect3D;
    	IDirect3DDevice9*		 m_pDevice3D;
    	D3DPRESENT_PARAMETERS	 m_d3dpp;
    	//
    
    protected:
    	//METHODES
    
    	//
    
    	//INITIALIZE THE APP WINDOW
    	bool InitWindow();
    	//
    
    	//INITIALIZE DIRECT3D
    	bool InitDirect3D();
    	//
    
    	//CALCULATEFPS
    	void CalculateFPS(float dt);
    	//
    };
    
    #endif
    

    beim compilieren kommt ein fehler der sagt dass ein ";" vor dem "{" am anfang fehlt.
    woran kann dass liegen?
    schonmal danke 😃



  • außerdem kommt dabei :

    GTexCube::GTexCube(D3DXVECTOR3 pos, D3DXVECTOR3 rot, D3DXVECTOR3 scal, const char* fileName)
    {
    	position  = pos;
    	rotation  = rot;
    	scale     = scal;
    	texName   = fileName;
    };
    

    dass da :

    error C2533: 'GTexCube::{ctor}': Ergebnistyp für Konstruktoren nicht zulässig c:\users\lucas\desktop\projekt1\projekt1\gtexcube.cpp
    


  • Der Fehler ist vermutlich in "d3dUtil.h". Vielleicht fehlt ein Semikolon am Ende.


Anmelden zum Antworten