for(int i=0; icount(); i++){
CCPoint* point = (CCPoint*) pointInsert~~>objectAtIndex;
}
Notice that you insert a CCPoint* object to the array and you must get a CCPoint* out of it later.
There’s no need to convert anything to string and back to point.
Besides that, you do a new of CCPoint, but nobody is doing a delete of it. If you take advantage of the framework’s reference counting you can avoid doing a delete yourself.
When you call array~~>addObject(temp) the array is calling temp~~>retain, so you can call temp~~>release() after it. When the element is removed from the array, this will call release for you and the object will be deleted.