I really love map in C++, it’s fast and easy to program.
Is there anything similar in Cocoa?
I know I can mix C++ and obj-c together, but I’d rather use a more obj-c way to program 🙂
Thanks!!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Try NSDictionary / NSMutableDictionary.
As an aside, you should use a map/dictionary when it’s the best data structure choice, not just because it’s easy and fast (although programmer time is expensive, proper structure choice will help create a better overall design). Maps make sense when you need to quickly look up values, and you don’t care if they are stored in a sorted order.