Look at the argument. In your class declaration you have int&, but in the definition you only have int (no reference).