errors that i shouldnt have...

ok this is odd, im going off of nehe’s tutorial #23 and i wrote it out exactly how it was on the page (didnt copy and paste because nothing soaks into your brain that way) im getting the error for the mouse direct input, heres the lines of code im getting the error for,

#include <dinput.h>
LPDIRECTINPUT7 g_DI;
LPDIRECTINPUTDEVICE7 g_KDIDev;

and here are the errors(same errors for the above 2 lines)

error C2146: syntax error : missing ‘;’ before identifier ‘g_DI’
error C2501: ‘LPDIRECTINPUT7’ : missing storage-class or type specifiers
fatal error C1004: unexpected end of file found

im kinda clueless as how to fix this because it is exactly like how he had it, but he got it compiled seome how…

scratches head
and if it matters, im using MSVC++ 6.0 pro

mmmkay, i downloaded the C++ version of that tut, and got the same error,

i did however get rid of that particular error by adding,

typedef struct IDirectInput7 *LPDIRECTINPUT7;
typedef struct IDirectInput7 *LPDIRECTINPUTDEVICE7;

but now it has 20 more errors, am i just doing somthing stupid here that im overlooking, or is the tutorial filled with errors?

Do you have the DirectX 7 SDK installed and your compiler properly configured to use the DirectX 7 SDK headers and libraries before resorting to its own?

yes i installed the ADK off of a disk, and i configured my compiler how he tells me to in his tutorial, so im really confused now.