I have include windows.h and want to use InterlockedAdd in vs2010 and compiles error "identifier not found", but the InterlockedIncrement
can work well. I try to use:
#include <intrin.h>
#pragma intrinsic(_InterlockedAdd)
and compiles error:
warning C4163: '_InterlockedAdd' : not available as an intrinsic function
1>test10.cpp(107): error C3861: 'InterlockedAdd': identifier not found
What's wrong with the code?