title: when i append a value the whole array is changing to the appended value
body: <p>I append in the for loop but for some reason instead of appending at the end it changes all the existing values in the array. </p>
  
  <pre><code>let a = 2
  
  class people {
      var name = " "
      var height = Int()
  }
  
  var trial = " "
  
  var p = [people]() 
  var user = people()
  for i in 0...a-1{
  
      if(i==0){
          user.name =  "jack"
          user.height = 180
      }
      else {
          user.name =  "ryan"
          user.height = 120
      }
  
      p.append(user)
      print(p[i].name, p[i].height);
  
  }
  for i in 0...a-1 {
      print(p[i].name, p[i].height);
  }
  </code></pre>
  
  <p>expectd: - 
  jack 180
  ryan 120
  jack 180 
  ryan 120</p>
  
  <p>result:- 
  jack 180
  ryan 120
  ryan 120
  ryan 120</p>