0
嘗試執行切換時出現此錯誤消息。Objective-C - 表達式不是整型常量表達式
/Users/xxxxx/Documents/iOS/xxxxx/main.m:83:14: Expression is not an integer constant expression
我的代碼
char *anotherCharacter = "a";
switch (*anotherCharacter) {
case "a":
NSLog(@"The letter a");
case "A":
NSLog(@"The letter A");
default:
NSLog(@"Not the letter A");
}
請指點。謝謝。