C1829: + - incompatible Types

[ERROR]

Description

For + and - only compatible types on both sides can be used. In C++ own implementation can be used with overloading.

Example
  struct A {

  
    int i;

  
  };

  
  void main() {

  
    int i;

  
    A a;

  
    i=i+a;   // error

  
  }

  
Tips

Use compatible types on the left and on the right side of the +/- operator. Or use the operator-overloading and define an own + or - operator!