unichar myChar = [myString characterAtIndex:0];
[myNSMutableArray addObject:myChar];
I am trying to insert the first char of a string into an array to create an array of characters. The first line does not give me an error. However, the second line contains the following error:warning: passing argument 1 of 'addObject:' makes pointer from integer without a cast
This also causes the application to crash with a "bad address" error. I thought this error was due to a memory allocation problem. Can someone shed some light on this.
source
share