Error del compilador C2541Compiler Error C2541

' eliminar ': eliminar: no se pueden eliminar objetos que no sean punteros'delete' : delete : cannot delete objects that are not pointers

El operador Delete se usó en un objeto que no es un puntero.The delete operator was used on an object that is not a pointer.

En el ejemplo siguiente se genera C2541:The following sample generates C2541:

// C2541.cpp
int main() {
   int i;
   delete i;   // C2541 i not a pointer

   // OK
   int *ip = new int;
   delete ip;
}