Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialNitin Kakkar
5,223 PointsExercise Enum with raw values, exercise checker indicate that there are compile errors but code compiles fine
Hello, Online exercise checker say there are compile errors however there are no errors on compile screen and my code compile fine in Xcode.
enum Compass : Int{ case north = 1 case sount = 2 case east = 3 case west = 4 };
let direction = Compass(rawValue : 2)
enum Compass : Int{
case North = 1
case Sount = 2
case East = 3
case West = 4
};
let direction = Compass(rawValue : 2)
1 Answer
Dennis Parussini
Treehouse Project ReviewerMaybe it's because your second case needs to be called South, not Sount. And the semicolon at the end of the enum is unnecessary.