title: Using malloc in C doesn't work
body: <p>I have a problem with C malloc function when I write:</p>
  
  <pre><code>int *ptr = malloc( sizeof(int) );
  </code></pre>
  
  <p>or this</p>
  
  <pre><code>int *x = (int*)malloc(sizeof(int*));
  </code></pre>
  
  <p>or this</p>
  
  <pre><code>int *x = (int*)malloc(sizeof(int));
  </code></pre>
  
  <p>error: 'x' : 'int *' differs in levels of indirection from 'int'</p>
  
  <p>I am using Visual Studio 2013, Win32 Console Application.</p>
  
  <p>What could be the problem?</p>