Original Post
When i compile my program some error message appeared
--------------------Configuration: CreateDevice - Win32 Debug--------------------
Compiling...
CreateDevice.cpp
D:\C++\D3D_2D\CreateDevice.cpp(22) : error C2146: syntax error : missing '';'' before identifier ''g_pDI''
D:\C++\D3D_2D\CreateDevice.cpp(22) : error C2501: ''LPDIRECTINPUT8'' : missing storage-class or type specifiers
D:\C++\D3D_2D\CreateDevice.cpp(22) : fatal error C1004: unexpected end of file found
Error executing cl.exe.
CreateDevice.obj - 3 error(s), 0 warning(s)
My Code
I also linked to dxguid.lib & dinput8.lib in my project,
I don''t know why, please help me thanks
#include <d3d8.h> #include <D3dx8core.h> #include <dinput.h> //----------------------------------------------------------------------------- // Global variables //----------------------------------------------------------------------------- LPDIRECT3D8 g_pD3D = NULL; // Used to create the D3DDevice LPDIRECT3DDEVICE8 g_pd3dDevice = NULL; // Our rendering device LPDIRECT3DTEXTURE8 g_pTexture = NULL; // Used to hold the texture LPD3DXSPRITE g_pSprite = NULL; // Uesd to draw 2D LPDIRECTINPUT8 g_pDI = NULL; // Used to create the DIDevice LPDIRECTINPUTDEVICE8 g_pKeyboard = NULL; // Used to get input |