when i use #include directive to add some headers files to my project (winbase.h, winnt.h), while compiling, there are many errors in these files found. How is this possible ???
Printable View
when i use #include directive to add some headers files to my project (winbase.h, winnt.h), while compiling, there are many errors in these files found. How is this possible ???
We won't be able to answer anything until you post the code and the errors.
You did include the file in angle brackets, right?
You need windef.h as well. Why can't you just use windows.h?
i wanted to use something declared in winnt.h and winbase.h (i found it in MSDN)I wanted to use LARGE_INTEGER type.
--------------------Configuration: CONSOLE_counting - Win32 Release--------------------
Compiling...
CONSOLE_counting.cpp
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(152) : error C2146: syntax error : missing ';' before identifier 'WCHAR'
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\winnt.h(152) : fatal error C1004: unexpected end of file found
Error executing cl.exe.
Creating browse info file...
BSCMAKE: error BK1506 : cannot open file '.\Release\CONSOLE_counting.sbr': No such file or directory
Error executing bscmake.exe.
CONSOLE_counting.exe - 3 error(s), 0 warning(s)
winnt.h:
typedef WCHAR *PWCHAR;
typedef WCHAR *LPWCH, *PWCH;
->typedef CONST WCHAR *LPCWCH, *PCWCH;
typedef WCHAR *NWPSTR;
typedef WCHAR *LPWSTR, *PWSTR;
Use:
That should work. For nearly anything that's declared, always use windows.h.Code:#define WIN32_LEAN_AND_MEAN
#include <windows.h>