I was using a 100 array becuase i was trying to fix the problem.
using the code that you gave me i now get loads of errors??
error LNK2019: unresolved external symbol __imp__DispatchMessageW@4 referenced in function _WinMain@16
error LNK2019: unresolved external symbol __imp__TranslateMessage@4 referenced in function _WinMain@16
error LNK2019: unresolved external symbol __imp__PeekMessageW@20 referenced in function _WinMain@16
error LNK2019: unresolved external symbol __imp__ShowWindow@8 referenced in function _WinMain@16
error LNK2019: unresolved external symbol __imp__CreateWindowExW@48 referenced in function _WinMain@16
Input Test.obj : error LNK2019: unresolved external symbol __imp__RegisterClassExW@4 referenced in function _WinMain@16
error LNK2019: unresolved external symbol __imp__LoadCursorW@8 referenced in function _WinMain@16
error LNK2019: unresolved external symbol __imp__DefWindowProcW@16 referenced in function "long __stdcall WindowProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WindowProc@@YGJPAUHWND__@@IIJ@Z)
error LNK2019: unresolved external symbol __imp__PostQuitMessage@4 referenced in function "long __stdcall WindowProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WindowProc@@YGJPAUHWND__@@IIJ@Z)
error LNK2019: unresolved external symbol _Direct3DCreate9@4 referenced in function "void __cdecl initD3D(struct HWND__ *)" (?initD3D@@YAXPAUHWND__@@@Z)
error LNK2019: unresolved external symbol _D3DXMatrixRotationY@8 referenced in function "void __cdecl render_frame(void)" (?render_frame@@YAXXZ)
error LNK2019: unresolved external symbol _D3DXMatrixPerspectiveFovLH@20 referenced in function "void __cdecl render_frame(void)" (?render_frame@@YAXXZ)
: error LNK2019: unresolved external symbol _D3DXMatrixLookAtLH@16 referenced in function "void __cdecl render_frame(void)" (?render_frame@@YAXXZ)
error LNK2001: unresolved external symbol _c_dfDIMouse
error LNK2001: unresolved external symbol _c_dfDIKeyboard
error LNK2001: unresolved external symbol _GUID_SysMouse
error LNK2001: unresolved external symbol _GUID_SysKeyboard
error LNK2019: unresolved external symbol _DirectInput8Create@20 referenced in function "void __cdecl initDInput(struct HINSTANCE__ *,struct HWND__ *)" (?initDInput@@YAXPAUHINSTANCE__@@PAUHWND__@@@Z)
error LNK2001: unresolved external symbol _IID_IDirectInput8W
MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol __imp__EncodePointer@4 referenced in function _pre_c_init
MSVCRTD.lib(atonexit.obj) : error LNK2001: unresolved external symbol __imp__EncodePointer@4
MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol __imp__InterlockedExchange@8 referenced in function ___tmainCRTStartup
MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol __imp__Sleep@4 referenced in function ___tmainCRTStartup
MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol __imp__InterlockedCompareExchange@12 referenced in function ___tmainCRTStartup
MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol __imp__HeapSetInformation@16 referenced in function ___tmainCRTStartup
MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol __imp__GetStartupInfoW@4 referenced in function ___tmainCRTStartup
MSVCRTD.lib(_error_.obj) : error LNK2019: unresolved external symbol __imp__WideCharToMultiByte@32 referenced in function "void __cdecl failwithmessage(void *,int,int,char const *)" (?failwithmessage@@YAXPAXHHPBD@Z)
MSVCRTD.lib(_error_.obj) : error LNK2019: unresolved external symbol __imp__IsDebuggerPresent@0 referenced in function "void __cdecl failwithmessage(void *,int,int,char const *)" (?failwithmessage@@YAXPAXHHPBD@Z)
MSVCRTD.lib(gs_report.obj) : error LNK2001: unresolved external symbol __imp__IsDebuggerPresent@0
MSVCRTD.lib(_error_.obj) : error LNK2019: unresolved external symbol __imp__MultiByteToWideChar@24 referenced in function "void __cdecl failwithmessage(void *,int,int,char const *)" (?failwithmessage@@YAXPAXHHPBD@Z)
MSVCRTD.lib(_error_.obj) : error LNK2019: unresolved external symbol __imp__RaiseException@16 referenced in function "int __cdecl DebuggerProbe(unsigned long)" (?DebuggerProbe@@YAHK@Z)
MSVCRTD.lib(_error_.obj) : error LNK2019: unresolved external symbol __imp__lstrlenA@4 referenced in function "void __cdecl _RTC_AllocaFailure(void *,struct _RTC_ALLOCA_NODE *,int)" (?_RTC_AllocaFailure@@YAXPAXPAU_RTC_ALLOCA_NODE@@H@Z)
MSVCRTD.lib(_error_.obj) : error LNK2019: unresolved external symbol __imp__GetProcAddress@8 referenced in function "void __cdecl _RTC_AllocaFailure(void *,struct _RTC_ALLOCA_NODE *,int)" (?_RTC_AllocaFailure@@YAXPAXPAU_RTC_ALLOCA_NODE@@H@Z)
MSVCRTD.lib(_pdblkup_.obj) : error LNK2001: unresolved external symbol __imp__GetProcAddress@8
MSVCRTD.lib(_error_.obj) : error LNK2019: unresolved external symbol __imp__LoadLibraryW@4 referenced in function "void __cdecl _RTC_AllocaFailure(void *,struct _RTC_ALLOCA_NODE *,int)" (?_RTC_AllocaFailure@@YAXPAXPAU_RTC_ALLOCA_NODE@@H@Z)
MSVCRTD.lib(_pdblkup_.obj) : error LNK2001: unresolved external symbol __imp__LoadLibraryW@4
MSVCRTD.lib(gs_report.obj) : error LNK2019: unresolved external symbol __imp__TerminateProcess@8 referenced in function ___report_gsfailure
MSVCRTD.lib(gs_report.obj) : error LNK2019: unresolved external symbol __imp__GetCurrentProcess@0 referenced in function ___report_gsfailure
MSVCRTD.lib(gs_report.obj) : error LNK2019: unresolved external symbol __imp__UnhandledExceptionFilter@4 referenced in function ___report_gsfailure
MSVCRTD.lib(gs_report.obj) : error LNK2019: unresolved external symbol __imp__SetUnhandledExceptionFilter@4 referenced in function ___report_gsfailure
MSVCRTD.lib(unhandld.obj) : error LNK2001: unresolved external symbol __imp__SetUnhandledExceptionFilter@4
MSVCRTD.lib(atonexit.obj) : error LNK2019: unresolved external symbol __imp__DecodePointer@4 referenced in function __onexit
MSVCRTD.lib(gs_support.obj) : error LNK2019: unresolved external symbol __imp__QueryPerformanceCounter@4 referenced in function ___security_init_cookie
MSVCRTD.lib(gs_support.obj) : error LNK2019: unresolved external symbol __imp__GetTickCount@0 referenced in function ___security_init_cookie
MSVCRTD.lib(gs_support.obj) : error LNK2019: unresolved external symbol __imp__GetCurrentThreadId@0 referenced in function ___security_init_cookie
MSVCRTD.lib(gs_support.obj) : error LNK2019: unresolved external symbol __imp__GetCurrentProcessId@0 referenced in function ___security_init_cookie
MSVCRTD.lib(gs_support.obj) : error LNK2019: unresolved external symbol __imp__GetSystemTimeAsFileTime@4 referenced in function ___security_init_cookie
MSVCRTD.lib(_pdblkup_.obj) : error LNK2019: unresolved external symbol __imp__HeapFree@12 referenced in function "int __cdecl _RTC_GetSrcLine(unsigned char *,wchar_t *,unsigned long,int *,wchar_t *,unsigned long)" (?_RTC_GetSrcLine@@YAHPAEPA_WKPAH1K@Z)
MSVCRTD.lib(_pdblkup_.obj) : error LNK2019: unresolved external symbol __imp__HeapAlloc@12 referenced in function "int __cdecl _RTC_GetSrcLine(unsigned char *,wchar_t *,unsigned long,int *,wchar_t *,unsigned long)" (?_RTC_GetSrcLine@@YAHPAEPA_WKPAH1K@Z)
MSVCRTD.lib(_pdblkup_.obj) : error LNK2019: unresolved external symbol __imp__GetProcessHeap@0 referenced in function "int __cdecl _RTC_GetSrcLine(unsigned char *,wchar_t *,unsigned long,int *,wchar_t *,unsigned long)" (?_RTC_GetSrcLine@@YAHPAEPA_WKPAH1K@Z)
MSVCRTD.lib(_pdblkup_.obj) : error LNK2019: unresolved external symbol __imp__GetModuleFileNameW@12 referenced in function "int __cdecl _RTC_GetSrcLine(unsigned char *,wchar_t *,unsigned long,int *,wchar_t *,unsigned long)" (?_RTC_GetSrcLine@@YAHPAEPA_WKPAH1K@Z)
MSVCRTD.lib(_pdblkup_.obj) : error LNK2019: unresolved external symbol __imp__VirtualQuery@12 referenced in function "int __cdecl _RTC_GetSrcLine(unsigned char *,wchar_t *,unsigned long,int *,wchar_t *,unsigned long)" (?_RTC_GetSrcLine@@YAHPAEPA_WKPAH1K@Z)
MSVCRTD.lib(_pdblkup_.obj) : error LNK2019: unresolved external symbol __imp__FreeLibrary@4 referenced in function "struct HINSTANCE__ * __cdecl GetPdbDll(void)" (?GetPdbDll@@YAPAUHINSTANCE__@@XZ)