0

我正在进行 CCPointFromString 转换,但每当我尝试输入时我的编码就会崩溃,这是代码,我做错了什么?

CCPoint *temp = new CCPoint(oldLocationCon.x, oldLocationCon.y);

pointInsert->addObject(temp);

for(int i=0; i<pointInsert->count(); i++){

    CCString point = (CCString*)pointInsert->objectAtIndex(i);

    CCPoint savePoint= CCPointFromString(point->getCString());

}
4

1 回答 1

1
CCArray * pointInsert = CCArray::create();
CCPoint * temp        = new CCPoint(0, 0);

pointInsert->addObject(temp);

for(int i = 0; i < pointInsert->count(); i++){

    CCString * point = static_cast<CCString*>(pointInsert->objectAtIndex(i));

    CCPoint savePoint= CCPointFromString(point->getCString());

}
于 2013-08-16T07:27:33.990 回答