mercredi 30 septembre 2020

Expression must have arithmetic or unscoped emun type/ Objectname

      (10 == Battery0.BatteryLife());  //if battery is fully charged
      {
          cout << " Battery is full" << "\n" << endl;
          break;
      }
      if (0 == Battery0.BatteryLife()) //if battery is empty
      {
      {
          cout << " Battery is empty" << "\n" << endl;
          break;
      }
      if (1 < Battery0.BatteryLife() || Battery0.BatteryLife() < 9) //neither
        

I'm creating bluetooth product. I made the ObjectName equal to 10 but still get an error in the first if statement. May I ask what needs to change.

Aucun commentaire:

Enregistrer un commentaire