The delete operator was used on an object that is not a pointer. Ex:
int main() {
int i;
delete i; // C2541
}
Possible resolution:
int main() {
int *ip = new int;
delete ip;
}
This article is a derivative work based on Compiler Error C2541 which is provided by MSDN Community Content - Visual C++.