title: getch() and mixing regular keys with arrow keys
body: <p>I can't get the text to display on console and neither is it saved properly. I got the arrow keys, enter,backspace and escpe working though.</p>
  
  <p>also another /small/ error I don't really get is when I press esc and it exits from the void I get directed to this piece of code</p>
  
  <pre><code>#endif  /* defined (_M_IX86) || defined (_M_X64) */
          __fastfail(FAST_FAIL_STACK_COOKIE_CHECK_FAILURE);
  </code></pre>
  
  <p>inside of gc_report.c, which I don't find nuch infor,ation about (or atleast related to my problem).</p>
  
  <pre><code>#define KEY_UP 72
  #define KEY_DOWN 80
  #define KEY_LEFT 75
  #define KEY_RIGHT 77
  #define KEY_ENTER 13
  #define KEY_BACKSPACE 8
  #define KEY_ESCAPE 27
  
  void texteditor(int x, int y,int kolommen,char textarr[20][20],int rijen=20)
  {
      int index = 0, indey = 0, keuze,lol = 20;
      do{
          gotoxy(index + x, indey + y); 
          keuze = 0;
          keuze = _getch();
          if (keuze == 0 || keuze == 0xE0 || keuze == 224)
          {
              keuze = _getch();
              gotoxy(index + x, indey + y);
              switch (keuze)
              {
              case KEY_UP:indey--;
                  break;
              case KEY_LEFT: index--;
                  break;
              case KEY_DOWN:indey++;
                  break;
              case KEY_RIGHT: index++;
                  break;
              }
              indey = (indey &lt;= 0) ? 0 : (indey &gt; kolommen) ? kolommen : indey;
              index = (index &lt;= 0) ? 0 : (index &gt; rijen) ? rijen : index;
          }
              if (keuze == 32 || (keuze &gt;= 46 &amp;&amp; keuze &lt;= 57) || (keuze &lt;= 64 &amp;&amp; keuze &gt;= 126))
              {
                  textarr[index][indey] = (char)keuze;
                  std::cout &lt;&lt; textarr[index][indey];
                  index++;
                  index = (index &lt;= 0) ? 0 : (index &gt; rijen) ? rijen : index;
              }
              if (keuze == KEY_BACKSPACE)
              {
                  index = index--;
                  gotoxy(index + x, indey + y);
                  std::cout &lt;&lt; " ";
                  index = (index &lt;= 0) ? 0 : (index &gt; rijen) ? rijen : index;
              }
              if (keuze == KEY_ENTER)
              {
                  index = 0;
                  indey++;
                  indey =(indey &gt;= kolommen) ? kolommen : indey++;
              }       
      } while (keuze != KEY_ESCAPE);}
  </code></pre>
  
  <p>I also searched a bit on the values behind the arrow keys, in which I found 37(left arrow),38(up arrow),39(right arrow),40(down arrow) as ASCII value, then what's the difference from mine?</p>