title: expected ')' error in a c++ code
body: <p>This is a Bresenham algorithm for a line in the first positive octant. The code is almost from the <a href="http://www.cs.helsinki.fi/group/goa/mallinnus/lines/bresenh.html" rel="nofollow">http://www.cs.helsinki.fi/group/goa/mallinnus/lines/bresenh.html</a>. but it doesnt work and the turbo c++ says there is an error in the line 4, ") EXPECTED". I really don't know how to solve it. I would be happy if there is any help.</p>
  
  <pre><code>#include &lt;iostream.h&gt;
  #include &lt;graphics.h&gt;
  #include &lt;conio.h&gt;
  void LINE(int x1, int y1, int x2, int y2)
  {
      int dx = x2 - x1;
      int dy = y2 - y1;
      int y = y1;
      int e = 0;
      for (int x = x1; x &lt;= x2; x++)
      {
  
          putpixel(x, y, color);
          e += dy;
      }
  }
   int main()
  {
      int x1, x2, y1, y2, color, gd = DETECT, gm;
      initgraph(&amp;gd, &amp;gm, "..\\bgi");
      cout &lt;&lt; "\n Enter Start Point:";
      cin &gt;&gt; x1 &gt;&gt; y1;
      cout &lt;&lt; "Enter End Point:";
      cin &gt;&gt; x2 &gt;&gt; y2;
      cout &lt;&lt; "Enter your Favorite Color:";
      cin &gt;&gt; color;
      line(x1, y1, x2, y2, color);
      getch();
      closegraph();
      return 0;
  }
  </code></pre>