title: error: expected ‘}’ before ‘else’?
body: <p>I get these errors when I compile my code.</p>
  
  <pre><code>experiment.cpp: In function ‘void convert(char*)’:
  experiment.cpp:47:5: error: expected ‘}’ before ‘else’
  experiment.cpp:47:5: error: expected ‘}’ before ‘else’
  experiment.cpp: At global scope:
  experiment.cpp:53:3: error: expected declaration before ‘}’ token
  </code></pre>
  
  <p>But I do not understand why. I checked all the bracing many times.</p>
  
  <pre><code>void convert(char *infix)
  {
      for(int i = 0 ; i &lt; m ; i++)
      {
         if(isalpha(infix[i]))
            printf("%c",infix[i]);
         else if(ispunct(infix[i]))
         {
             if(!isempty())
                 push(infix[i]);
             else
             {
                 if(check(infix[i]));
                    push(infix[i]);
                 else
                 {
                    printf("%c",pop());
                    push(infix[i]);
                 }
             }
         }    
      }
  }
  </code></pre>