title: Simple Pointer Operations in Swift?
body: <p>Let's say I do the following in C++:</p>
  
  <pre><code>int i = 1;
  int* ptr = &amp;i;
  *ptr = 2;
  cout &lt;&lt; i &lt;&lt; '\n'; 
  </code></pre>
  
  <p>And I want to do something similar in swift. Could I do the following?</p>
  
  <pre><code>var i : Int = 1
  var iptr : UnsafeMutablePointer&lt;Int&gt; = &amp;i
  iptr.memory = 2
  print(i)
  </code></pre>
  
  <p>And achieve the same result?</p>