title: how to read a const char* from keyboard input and perform strlen() on it?
body: <p>So I have been trying for 1.30 hour to get this to work. I am new indeed, but I have searched all over the place and couldn't find an exact answer. I do not wish to do this another way, as it would take away the entire purpose of learning to code. I have to find why this thing isn't working. I tried dozens if not hunderds of syntaxes, but nothing works.</p>
  
  <p>I want to read in a <code>const char* name</code>,  than count the number of elements in it, so I thought had to be <code>strlen()</code>, and than output the name and the number of elements. If that works I can write the rest of the code.</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  int main()
  {
      //writing your name, and counting the characters including \0
      int a;
      const char* name;
  
      a = int strlen(name);
  
      cin.getline(name);
  
      cout &lt;&lt; name;
      cout &gt;&gt; a;
  
      return 0;
  }
  </code></pre>