title: char and char* (pointer)
body: <p>I would like to understand how pointers work, so i created this small program. first of all i create a p pointer, which points to a char. </p>
  
  <p>The first question is at this point. If i create a pointer, the value of it is a memoryaddress (if i point it to a non-pointer object), but this time it is "haha" in my example. Why does it work this way in char*? And how i can add value to it with cin >> p? </p>
  
  <p>My second question is that, i created a q char, which has the value of the *p pointer at the point i created it. BUT its value and address are "h" too, but why? It must be the memory address of this char object! It's pointless :D (mingw - gcc)</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  int main() 
  {
   /* char *p;
      cin &gt;&gt; p;                      //forexample: haha */
  
      char * p = "haha";
      char q = *p;
      std::cout &lt;&lt; "&amp;q = " &lt;&lt; &amp;q &lt;&lt; std::endl;   //&amp;q = h
      std::cout &lt;&lt; "q  = " &lt;&lt;  q &lt;&lt; std::endl;   //q = h
  
      return 0;
  }
  </code></pre>
  
  <p>MORE: If i allocate memory first with char a[100]; char *p=a; then &amp;q = h»ŢĹ, so "h" and some mess. but it should be a memoryaddress! and my question is, why is not it address then?</p>