Errors in dinput.h?

Hi, I can’t seem to compile this. As I am a newbe to opengl and C++ I don’t really understand the error message but I believe there is a problem with my dinput.h file.

Here is what I tried to compile with VC++ 6:

http://www.christov.com/tmp/lesson23.cpp
http://www.christov.com/tmp/lesson23.dsp
http://www.christov.com/tmp/lesson23.dsw

And here is the error mesage:

--------------------Configuration: lesson23 - Win32 Debug--------------------
Compiling…
Lesson23.cpp
e: mp\lesson23\lesson23.cpp(16) : error C2146: syntax error : missing ‘;’ before identifier ‘g_DI’
e: mp\lesson23\lesson23.cpp(16) : error C2501: ‘LPDIRECTINPUT7’ : missing storage-class or type specifiers
e: mp\lesson23\lesson23.cpp(16) : fatal error C1004: unexpected end of file found
Error executing cl.exe.

lesson23.exe - 3 error(s), 0 warning(s)

Is it possible to update the dinput.h file? If so, where from?

Thanks for your help

I haven’t tried but it sounds that you need to download the latest DirectX SDK from Microsoft… In this specific case, it seems that you need the DirectX 7.0 SDK…

Regards.

Eric

P.S. : just checked ; you can find it here :
http://msdn.microsoft.com/code/sample.asp?url=/msdn-files/027/000/229/msdncompositedoc.xml

:slight_smile: Thank you Eric, you are wonderful. I love this forum!