enum - error

What am I doing wrong?

This is the entire program.

User uploaded file

Xcode4-OTHER, Mac OS X (10.6.7)

Posted on Dec 29, 2012 4:02 PM

Reply
2 replies

Dec 29, 2012 5:25 PM in response to GeekPod42

Review the language documentation for the switch statement.

This is a sample of the correct usage:


enum RequestAction {Play, Options, Help};


int variable = Play;

switch (variable)

{

case Play:

{

// Do something.

break;

}

caseOptions:

{

// Do something else.

break;

}

case Help:

{

// Do something else.

break;

}

default:

{

// Do something when variable is not Play, Options or Help.

break;

}

}

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

enum - error

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.