jeudi 2 juillet 2015

warning C4127: conditional expression is constant in cl command

#define Val_MAX 0
int main() {
   if(Val_MAX)
      printf("The value is %d",VALUE_MAX);
   return 0;
}

When I try to compile the above program if(VALUE_MAX) is showing a warning

conditional expression is constant.

How to solve the above warning?

Aucun commentaire:

Enregistrer un commentaire