title: Using preprocessor statements for Macros in C
body: <p>I am making a program that shifts values left or right depending on the value of the 2nd argument. If it is positive then it shifts left, else it shifts right. N is the number of times it shifts left or right. I am having trouble in implementation of my Macros.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  #define SHIFT(value, n) 
  
  #if (n) &gt; 0
      (unsigned int value) &lt;&lt;= (int n);
  #else 
      ( (unsigned int value)) &gt;&gt;= (int -n);
  
  
  
  int main()
  {
      printf("%d\n", SHIFT(1, 4));
  } 
  </code></pre>
  
  <p>Currently I am getting a conditional directive error. </p>