title: Will an array of pointers be equal to an array of chars?
body: <p>I have got this code:</p>
  
  <pre><code>import std.stdio;
  import std.string;
  
  void main()
  {
      char [] str = "aaa".dup;
      char [] *str_ptr;
      writeln(str_ptr);
      str_ptr = &amp;str;
      *(str_ptr[0].ptr) = 'f';
      writeln(*str_ptr);
      writeln(str_ptr[0][1]);
  
  }
  </code></pre>
  
  <p>I thought that I am creating an array of pointers <code>char [] *str_ptr</code> so every single pointer will point to a single <code>char</code>. But it looks like <code>str_ptr</code> points to the start of the string <code>str</code>. I have to make a decision because if I am trying to give access to (for example) <code>writeln(str_ptr[1]);</code> I am getting a lot of information on console output.  That means that I am linking to an element outside the boundary.</p>
  
  <p>Could anybody explain if it's an array of pointers and if yes, how an array of pointers works in this case? </p>