Missing argument for parameter error in Swift
<p>I am exploring Swift and trying to write a function that compares two Rank values by comparing their raw values. But I get the error: missing argument for parameter 'rawValue' in call card().compareValue(card.Ace, card.King)</p>

<p>Any ideas?</p>

<pre><code>enum card : Int {
    case Ace = 1
    case Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten
    case King, Queen, Jack

    func cardValue() -&gt; String {
        switch self {
        case .Ace:
            return "Ace"

        case .King:
            return "King"

        case .Queen:
            return "Queen"

        case .Jack:
            return "Jack"

        default:
            return String(self.rawValue)
        }
    }

    func compareValue(val1: card, val2: card) -&gt; String {
        if val1.rawValue &gt; val2.rawValue {
            return "\(val1) is greater than \(val2)"
        } else {
            return "\(val1) is not greater than \(val2)"
        }
    }
}

card().compareValue(card.Ace, card.King) // error
</code></pre>