functions inside switch cases
Xcode4-OTHER, Mac OS X (10.6.7)
​​ ​
The Apple Support Community will permanently close on November 20, 2026. Starting today, the site will no longer accept new posts and is available in a read-only state.
You can continue to find trusted guidance and support on the official Apple Support site.
We want to thank the community members who have contributed their time and expertise to help others with their Apple products.
The Apple Support Community will permanently close on November 20, 2026. Starting today, the site will no longer accept new posts and is available in a read-only state.
You can continue to find trusted guidance and support on the official Apple Support site.
We want to thank the community members who have contributed their time and expertise to help others with their Apple products.
It's hardly correct.
Play is a primitive (integer); it's not a verb. An integer can be used within a function but not the way you're using it.
You really need to study up on language fundamentals.
please, expound. I cant find an example how to implement a function, all of the examples have the following:
...
case Play:{
//do something
break;
}
...
You'd do well to learn the difference between integers (type: int) and functions before trying to go any further.
If you don't know any C, you're headed for a world of pain. I'd suggest you put aside your attempts at Objective C and Cocoa and learn the fundamentals. Start here:
1
Learn C on a Mac
Then move on to
2
Programming in Objective C
Then start working through
3.
Cocoa Programming for Mac
I made the mistake of starting with 3, realised I needed to read 2 by about Chapter 5, then about a third of the way through 2 realised I needed 1.
Do it the right way round and save yourself both time and a lot of headaches. 😉
Sorry, I do not clearify, this is C++.
Sounds like a namespace collision. Rename the function.
Thank you so much I would never have seen that!
functions inside switch cases