Thanks guys. I changed my code to look like this:-
But essentially I still get the same error:-Code:#include <windows.h> int main (int argc, char *argv[]) { LONG x=0, y=2, z=3; x = InterlockedExchangeAdd (&y, z); x = _InterlockedAnd (&y, 4); return 0; }
I've even stripped out all preprocessor directives except for these - but the error still persists:-HelloWorld.cpp(12) : error C3861: '_InterlockedAnd': identifier not found
[Edit...] Sorry, I missed out the #pragma. It now works after adding thatCode:WIN32 _WIN32 _WINDOWS _MBCS _DEBUG DEBUG![]()




Reply With Quote