在以下幾點: public class p
{
short? mID;
short? dID;
}
short id = p.mID ?? -p.dID.Value;
編譯器給我的錯誤: Error 21 Cannot implicitly convert type 'int' to 'short'. An explicit conversion exists (a
這裏是我的代碼: @interface Game : Layer // this is from cocos2d
{
int maxSprites;
}
@implementation Game
-(void)initVariables
{
maxSprites = 18;
}
後來,當我把它打印出來, NSLog(@" maxSprites = %d ",