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
Post a Comment