title: Map with int key in objectiveC
body: <p>I need to map integer values to objects in some sort of mutable array. What would be the best way to go about this. The only options I see are to use objectiveC++ ...</p>
  
  <pre><code>std::map&lt;int, id&gt; theMap;  // if i can use id?
  </code></pre>
  
  <p>or put the ints into <code>NSString</code> or <code>NSNumber</code> to use as keys for an <code>NSMutableDictionary</code>.</p>
  
  <p>I am using this for my network class where the client would send some data (the key would be in the payload). Then on read the key would be extracted from the packet, then object in the map would be pulled out to continue the program based on what was received. (I was worried about the client receiving payloads out of order or lost payloads.) </p>
  
  <p>Which would be the best / fastest approach?</p>