title: Swift Class is not constructible
body: <p>I'm following along with the iBook for swift programming, but I am getting an error when I try to contruct a class with var.  Here is a stuct and a class:</p>
  
  <pre><code>struct Resolution {
      var width = 0
      var height = 0
  }
  
  class VideoMode {
      var resolution = Resolution()
      var interlaced = false
      var frameRate = 0.0
      var name: String?
  }
  </code></pre>
  
  <p>I can create an instance of the Resolution struct just fine, but I can't seem to make one for VideoMode Class.</p>
  
  <pre><code>    var r = Resolution()
      println("Width:\(r.width) Height:\(r.height)")
      r.height = 1234
      r.width = 9877
      println("Width:\(r.width) Height:\(r.height)")
      var vm = VideoMode() //Says that 'VideoMode' is not constructible with ()
      let vm = VideoMode() //Apparently this works though.... why?
      vm.resolution.width = 22222
      vm.resolution.height = 1234
      vm.name = "Calimari"
      print(vm)
  </code></pre>
  
  <p>I find this strange can anyone explain?</p>
  
  <p>Update:
  Apparently it works ok in playground.  I am not running this in playground.  I am running it using the master detail template using swift code.  I added the "var vm = VideoMode()" in the viewDidLoad method and I get an error.  But it seems to be ok if I change it to "let".  No clue why that makes a difference.</p>
  
  <p><img src="https://i.stack.imgur.com/MQIGT.png" alt="enter image description here"></p>