hi, everyone:
I try to include direct input into my program, but have compiling error, please help
I installed DirectX SDK 2006 December version into my computer,
Using Visual C++ 2005 or Visual C++ 6.0 , both get:
Quote:
error C2146: syntax error : missing ';' before identifier 'pIDirectInput'
I already include <dinput.h>
here is the code:
#include <dinput.h>
#define ITEMS_NUM 10
static LPDIRECTINPUT8 pIDirectInput;
tracing into dinput.h file, I do found
Quote:
typedef struct IDirectInput8 *LPDIRECTINPUT8;
that means, it's indeed defined inside dinput.h, why still error?
also i found:
Quote:
#define DIRECTINPUT_VERSION 0X0800
suspicious, but I don't know if it's relevant. I did not do anything about it in my program.
I didnot use UNICODE in vc6, but vc2005 the unicode is a default, both have this error.
could anybody tell me, what is wrong ?
thanks
winston