开发者

Objective-C : expected ']' before ';' token

开发者 https://www.devze.com 2023-01-04 07:12 出处:网络
Trying to follow some basic examples and getting stuck by this code that is EXACTLY like the example I am following:

Trying to follow some basic examples and getting stuck by this code that is EXACTLY like the example I am following:

[[NSUs开发者_C百科erDefaults standardUserDefaults] setObject:@"Sample Text" forKey:kWordsOfWisdom];

gives me the error:

expected ']' before ';' token


I had this:

#define kWordsOfWisdom @"Sample Text";

that ; on the end was the problem.

0

精彩评论

暂无评论...
验证码 换一张
取 消