[DirectInput] Inizializzing Keyboard..

Started by
2 comments, last by Tano 18 years, 5 months ago
I've a little problem.. I've declared two variables:
LPDIRECTINPUT8		 g_lpDI;
LPDIRECTINPUTDEVICE8 g_lpDIDevice;
So, when i try to create a new device:

hr = DirectInput8Create( hIstance, DIRECTINPUT_VERSION, 
                                         IID_IDirectInput8, (VOID**)&g_pDI, NULL );
	
	if FAILED(hr) 
		return FALSE; 
	
	hr = g_lpDI->CreateDevice(GUID_SysKeyboard, &g_lpDIDevice, NULL); 
	if FAILED(hr) 
		return FALSE; 
The Compilator give me this error: error C2146: syntax error : missing ';' before identifier 'g_lpDI' error C2501: 'LPDIRECTINPUT8' : missing storage-class or type specifiers : fatal error C1004: unexpected end of file found Where is the error??
1pad4life7
Advertisement
Did you include <dinput.h> in that .cpp file?

The compiler doesn't know the types you're using.

Fruny: Ftagn! Ia! Ia! std::time_put_byname! Mglui naflftagn std::codecvt eY'ha-nthlei!,char,mbstate_t>

check your include files or whatever definitions before g_lpDI for a missing ';'
That's it! I'm so stupid ^_^'. Thanks a Lot!
1pad4life7

This topic is closed to new replies.

Advertisement