title: Get the number of elements in a pointer to a char array in C++
body: <p>I realise this is an incredibly noob question, but I've googled for it and can't seem to find an answer (probably because I've worded the question wrong... feel free to fix if I have)</p>
  
  <p>So I have this code:</p>
  
  <pre><code>int main(int argc, char* argv[])
  {
      puts(argv[1]);
      return 0;
  }
  </code></pre>
  
  <p>It works fine if I've passed a parameter to my program, but if I haven't, then obviously it's going to fail since it's trying to index a non-existent element of the array.</p>
  
  <p>How would I find how many elements in in my string array?</p>