title: What does int* pint; pint = (int*)data; mean?
body: <p>I'm reading how pointers work <a href="http://www.cplusplus.com/doc/tutorial/pointers/" rel="nofollow">here</a> because I'm trying to understand qsort(). But the guide gives this code:</p>
  
  <pre><code>// increaser
  #include &lt;iostream&gt;
  using namespace std;
  
  void increase (void* data, int psize)
  {
    if ( psize == sizeof(char) )
    { char* pchar; pchar=(char*)data; ++(*pchar); }
    else if (psize == sizeof(int) )
    { int* pint; pint=(int*)data; ++(*pint); }
  }
  
  int main ()
  {
    char a = 'x';
    int b = 1602;
    increase (&amp;a,sizeof(a));
    increase (&amp;b,sizeof(b));
    cout &lt;&lt; a &lt;&lt; ", " &lt;&lt; b &lt;&lt; endl;
    return 0;
  }
  </code></pre>
  
  <p>without explaining what the line</p>
  
  <pre><code>pint=(int*)data;
  </code></pre>
  
  <p>and</p>
  
  <pre><code>pchar=(char*)data;
  </code></pre>
  
  <p>means. I understand what the rest means, but it doesbt quite make sense to me what (char*)data could mean. Is it pointing to the value of char? But how could that be if char is a variable type?</p>