title: Advantage of using shift operator in #define
body: <p>In the existing code, there are a few "reasons" for a certain failure case. These "reasons" are #defined as follows:</p>
  
  <pre><code>#define STRING_NOT_FOUND   (1 &lt;&lt; 0)
  #define STRING_INVALID     (1 &lt;&lt; 1)
  #define STRING_TOO_LARGE   (1 &lt;&lt; 2)
  ...etc
  </code></pre>
  
  <p>These are set using function <code>setFailureReason(int reason);</code></p>
  
  <p>What is the advantage in using shift operator while defining these constants as compared to using numbers, as shown below:</p>
  
  <pre><code>#define STRING_NOT_FOUND   1
  #define STRING_INVALID     2
  #define STRING_TOO_LARGE   4
  </code></pre>