0

重複の可能性:
インターフェイス タイプを静的に割り当てることはできませんか?

他の人と同じように私のコードは次のとおりです。

TZNotifications.h
extern NSString *const TZNotificationKeywordAuthentication;

TZNotifications.m
NSString *const TZNotificationKeywordAuthentication = @"NOTIFICATION_KEYWORD_AUTHENTICATION";

しかし、次のようなコードで 2 つのエラーが発生します。

ここに画像の説明を入力

4

2 に答える 2

0

'const'と型宣言を置き換えます。

TZNotifications.h

extern const NSString *TZNotificationKeywordAuthentication;

TZNotifications.m

const NSString *TZNotificationKeywordAuthentication = @"NOTIFICATION_KEYWORD_AUTHENTICATION";
于 2012-10-01T07:37:55.950 に答える
0

君たちありがとう。この奇妙なエラーを引き起こしているヘッダー ファイルの 1 つの末尾に意味のない文字列を愚かに追加したことが判明しました。申し訳ありません...

于 2012-10-01T07:53:47.323 に答える