title: C: Accessing the second argv via a pointer
body: <p>As I'm quite new to C, there's something I don't yet get about pointers. I'd like to check wether a command line argument is integer or not, but in a separate function, so that I pass in the pointer of the argv array.</p>
  
  <pre><code>int main(int argc, char* argv[]){
      if(check(argv)){
          // Do stuff to argv[1]
      }
  }
  
  int check(char* p){
      // Test wether p+1 is int
      return 1;
  }
  </code></pre>
  
  <p>I have tried several things mostly resulting in weird printf's (when printing the dereferenced pointer to test the value).</p>
  
  <pre><code>int i = atoi(argv[1]);
  </code></pre>
  
  <p>Works just fine, of course. But as the pointer is the only thing passed to the function, I'm paralysed.</p>