title: Pointer initialization with new keyword and without it
body: <p>When I try to declare in another way a pointer I try to use the new keyword and give it a try:</p>
  <pre><code>#include&lt;iostream&gt;
  using std::cin;
  using std::cout;
  using std::endl;
  
  int main ()
  {
      int *p = new int;
      *p = 5;
      cout &lt;&lt; *p &lt;&lt; endl;
  
      return 0;
  }
  </code></pre>
  <p>but when I try to declare the same pointer but without the new keyword it gives me an error like the code below:</p>
  <pre><code>#include&lt;iostream&gt;
  using std::cin;
  using std::cout;
  using std::endl;
  
  int main ()
  {
      int *p;
      *p = 5;
      cout &lt;&lt; *p &lt;&lt; endl;
  
      return 0;
  }
  </code></pre>
  <p>So what is the reason for that error and what is the difference between the two ways?</p>