title: Pointers in Swift
body: <p>I'm trying to understand the use of pointers in Swift, in particular: <code>Unsafe[Mutable]Pointer</code> and <code>UnsafeRaw[Mutable]Pointer</code>. I have several questions on the subject.</p>
  
  <ol>
  <li><p>Is <code>UnsafePointer &lt;T&gt;</code> equal to <code>const T * Pointer</code> in ? and <code>UnsafeMutablePointer &lt;T&gt;</code> is equal to <code>T * Pointer</code> in C?</p></li>
  <li><p>What is the difference between <code>Unsafe[Mutable]Pointer</code> and <code>UnsafeRaw[Mutable]Pointer</code>?</p></li>
  <li><p>Why does this compile</p></li>
  </ol>
  
  <p></p>
  
  <pre><code>func receive(pointer: UnsafePointer&lt;Int&gt; ) {
      print("param value is: \(pointer.pointee)")
  }
  
  var a: Int = 1
  receive(pointer: &amp;a) // prints 1
  </code></pre>
  
  <p>but this gives me an error?</p>
  
  <p></p>
  
  <pre><code>var a: Int = 1
  var pointer: UnsafePointer&lt;Int&gt; = &amp;a // error : Cannot pass immutable value of type 'Int' as inout argument
  </code></pre>