C1809: Integer value for switch-expression expected

[ERROR]

Description

The specified switch expression evaluated to an illegal type.

Example
  float f;

  
  void main(void) {

  
    switch(f) {

  
    case 1:

  
      f=2.1f;

  
      break;

  
    case 2:

  
      f=2.1f;

  
      break;

  
    }

  
  }

  
Tips

A switch expression must evaluate to an integral type, or a class type that has an unambiguous conversion to an integral type.