title: C- Why does my code run in an IDE but not a linux environment(silo)?
body: <p>This is my code </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;string.h&gt;
  
  void CharacterScan(int*);
  
  int main(void){
      int* iPtr;
      CharacterScan(&amp;iPtr);
  
  
  }
  
  void CharacterScan(int* iPtr){
      char ch;
      int asciiValue;
      do{
  
      printf("Enter any character: \n");
      ch = _getch();
       asciiValue=(int)ch;
          iPtr = (int*)asciiValue;
  
       printf("ASCII value of character %c is: %d\n",ch,iPtr);
      }while(ch != 27);
      return ;
  }
  </code></pre>
  
  <p>As I said, it runs fine in the IDE I am using, but it doesn't run in a Linux environment. I get the following errors:</p>
  
  <pre><code>testchar.c: In function ‘main’:
  testchar.c:19:5: warning: passing argument 1 of ‘CharacterScan’ from incompatible pointer type [enabled by default]
   CharacterScan(&amp;iPtr);
   ^
  testchar.c:15:6: note: expected ‘int *’ but argument is of type ‘int **’
  void CharacterScan(int*);
    ^
  testchar.c: In function ‘CharacterScan’:
  testchar.c:30:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
       iPtr = (int*)asciiValue;
              ^
  /tmp/cceTSMdl.o: In function `CharacterScan':
  testchar.c:(.text+0x32): undefined reference to `_getch'
  collect2: error: ld returned 1 exit status
  </code></pre>
  
  <p>I have never encountered this problem before. Does anyone know what could be the problem? </p>