I'm trying to compile a people.swift
class with Terminal
of MacOSX
class People
{
let name:String = ""
let age:Int = 0
init(name:String, age:Int)
{
self.name = name
self.age = age
}
let anyPeople = People.init(name:"Jaum", age:23)
println("O \(anyPeople.name) tem \(anyPeople.age) anos.")
}
The command I am giving is ./swift -emit-executable people.swift
But you're giving the following error
people.swift:13:5: error: expected declaration
println("O \(anyPeople.name) tem \(anyPeople.age) anos.")
^