title: error C2143: syntax error : missing ';' before ':'
body: <p>I get Error:error C2143: syntax error : missing ';' before ':'in visual studio</p>
  
  <p>for the following cpp code. Can anyone explain why I get this error?</p>
  
  <p>help appreciated thanks</p>
  
  <pre><code>#include&lt;iostream&gt;
  using namespace std;
  
  #define UP '1';
  #define DOWN '2';
  #define RIGHT '3';
  #define LEFT '4';
  
  void main()
  {
      char key ;
      char value = 'x';
      cout&lt;&lt;"Enter 1 or 2 or 3 or 4"&lt;&lt; endl;
      cin&gt;&gt;key;
      switch(key)
      {
      case UP :
          cout&lt;&lt;"case UP"&lt;&lt;endl;
          break;
      case DOWN:
          cout&lt;&lt;"case DOWN"&lt;&lt;endl;
          break;
      case LEFT:
          cout&lt;&lt;"case LEFT"&lt;&lt;endl;
          break;
      case RIGHT:
          cout&lt;&lt;"case RIGHT"&lt;&lt;endl;
          break;
      }
  }
  </code></pre>