I have created a Win32 Console Project in Visual Studio 2010. In this project I would like to use an external library with corresponding headers. The header files includes variables declared as
stated as above in captitals. Having done very little programming in C++, I don't recognise these types and I do get errors for each line of code containing them:
WORD myVariable;
Error:
error C2146: syntax error : missing ';' before identifier 'myVariable'
This is probably a very simple thing, but would like some help to increase my C++ knowledge.
What do I need to be able to use these types?
These types are defined in windows.h
, so you need to put #include <windows.h>
somewhere.
In your case, you probably need to put it in before the header of the external library you're mentioning:
#include <windows.h>
// Possibly other stuff here...
#include <external-library.h>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With