title: Filling char pointer correctly
body: <p>I have a char pointer:</p>
  
  <pre><code>char* s = new char[150];
  </code></pre>
  
  <p>Now how do i fill it? This:</p>
  
  <pre><code>s="abcdef";
  </code></pre>
  
  <p>Gives warning about deprecation of conversion between string literal and <code>char*</code>, but generally works.</p>
  
  <p>This:</p>
  
  <pre><code>char* s = new[150]("abcdef");
  </code></pre>
  
  <p>Does not work, gives an error.</p>
  
  <p>How to do this properly? Note that I want the memory allocation to have 150*sizeof(char) bytes and contain "abcdef". I know about malloc, but is it possible to do with new?</p>
  
  <p>Its for an assignment where i cant use the standard library.</p>