title: declare fixed size character array on stack c++
body: <p>I am attempting to create a character array of a fixed size on the stack (it does need to be stack allocated).  the problem I am having is I cannot get the stack to allocate more than 8 bytes to the array:</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  int main(){
          char* str = new char[50];
          cout &lt;&lt; sizeof(str) &lt;&lt; endl;
  
          return 0;
  }
  </code></pre>
  
  <p>prints</p>
  
  <pre><code>8
  </code></pre>
  
  <p>How do I allocate a fixed size array (in this case 50 bytes. but it may be any number) on the stack?</p>