c - problem in boolean expression with if statement -


i need confirmation. correct o/p told me following expression not work

thanks in advance.

#define 11  #define b 12  #define c 13          // want if array[i] has values of of these      if( array[i] ==  (a) ||(b) ||( c))        // function       else       printf("no match");  

replace code this:

if( array[i] == || array[i] == b || array[i] == c)

each part of boolean condition must complete expression. while wrote valid c code, doesn't achieve want: need make array element comparison in every part.


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -