Skip to content

Latest commit

 

History

History
26 lines (21 loc) · 564 Bytes

compiler-error-c2111.md

File metadata and controls

26 lines (21 loc) · 564 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Error C2111
Compiler Error C2111
11/04/2016
C2111
C2111
38fd42ec-1480-4a44-aaca-ae4593ed5f50

Compiler Error C2111

'+' : pointer addition requires integral operand

An attempt was made to add a nonintegral value to a pointer using the plus ( + ) operator.

The following sample generates C2111:

// C2111.cpp
int main() {
   int *a = 0, *pa = 0, b = 0;
   double d = 0.00;

   a = pa + d;   // C2111
   a = pa + b;   // OK
}