objective c - how to convert type char to type id -


actually have store 3 character in nsarray

` char plus = '+'; char minus = '-'; char multiply = '*';

nsarray *operator = [nsarray arraywithobjects : plus , minus ,multiply,nil];` 

obviously before store 3 characters in nsarray have these character convert id. how convert char id.or guide me other better or efficient technique save 3 characters.

wrap characters using nsnumber, example, @(plus) , add operator nsarray. char [(nsnumber *)operator[index] charvalue]


Comments

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

javascript - addthis share facebook and google+ url -