title: How to Properly Declare Array of Custom Objects in Swift?
body: <p>Here is my custom class...not sure if I'm missing anything in it...</p>
  
  <pre><code>import UIKit
  
  class baseMakeUp {
      var Image = UIImage()
      var Brand: String
      var Color: String
      var Rating: Int = 0
  
      init (Brand: String, Color: String) {
          self.Brand = Brand
          self.Color = Color
      }
  }
  </code></pre>
  
  <p>I'm trying to instantiate here...</p>
  
  <pre><code>import UIKit
  
  class ViewController: UIViewController, UITableViewDataSource, UITableViewDelegate {
  
      required init(coder aDecoder: NSCoder) {
          fatalError("init(coder:) has not been implemented")
      }
  
      let cellIdentifier = "cellIdentifier"
  
      var foundation: [[baseMakeUp]]
      var blush: [[baseMakeUp]]
      var eyes: [[baseMakeUp]]
      var lips: [[baseMakeUp]]
      var nails: [[baseMakeUp]]
  
      // put some test data in makeup arrays here...
      foundation[0].Brand = "Revlon"     -------------&gt; "Expected declaration" error.
      foundation[0].Color = "Red"
      foundation[0].Rating = 3
      foundation[1].Brand = "MAC"
      foundation[1].Color = "Blue"
      foundation[1].Rating = 4
  </code></pre>
  
  <p>I didn't include the rest of the ViewController class, because I didn't think it was necessary.</p>
  
  <p>The error occurs when I attempt to assign a value to foundation[0].Brand</p>
  
  <p>Appreciate your help in advance!</p>