title: Which gotoxy() function should I use?
body: <p>during this year in school my teacher showed us this function:</p>
  <pre><code>#include&lt;Windows.h&gt;
  void gotoxy(int x,int y)
  {
      COORD punto;punto.X=x;punto.Y=y;
      SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),punto);
  }
  </code></pre>
  <p>And looking in here some posts I read about this one based on ANSI escape codes</p>
  <pre><code>#include&lt;stdio.h&gt;
  void gotoxy(int x, int y)
  {
      // &lt;ESC&gt;[(ROW);(COLUMN)f
      printf(&quot;\x1B[%i;%if&quot;,y,x);
  }
  </code></pre>
  <p>I kind of like the second one more, I feel I understand it better. But I wanted to ask here which of them is better because I know I'm probably missing something. What do you think?</p>