我已经包含了windows.h并想在vs2010中使用InterlockedAdd,但编译时出现错误"identifier not found",但是InterlockedIncrement可以正常工作。我尝试使用:
#include <intrin.h>
#pragma intrinsic(_InterlockedAdd)
出现编译错误:
警告 C4163:'_InterlockedAdd':不可用作内部函数
1>test10.cpp(107):错误 C3861:未找到标识符“InterlockedAdd”
该代码有什么问题?