为什么xcode IDE认为`friend'是保留字 [英] Why does the xcode IDE think `friend` is a reserved-word
问题描述
我一直在一个个人项目上工作,并在我创建的新类中有以下代码:
@property(readonly,getter = isFriend)BOOL friend;
似乎没有什么问题,当我构建它,它工作的编译绝对很好,但是当我们在 xcode IDE
中查看这行代码时,它看起来像
我的问题是为什么 xcode IDE
似乎认为单词 friend
是关键字/保留字?
可能因为 friend
是C ++中的保留字。请参见友谊和继承。
您可以尝试修改编译器的xCode设置,以查看IDE是否选择此选项。请参阅
我可以使用C ++ 11与Xcode吗? / a>
I've been working on a personal project and have the below code in a new class that I have created:
@property (readonly, getter = isFriend) BOOL friend;
There doesn't seem to be anything wrong with it and when I build it, it works compiles absolutely fine but when we look at this line of code in the xcode IDE
it looks like
My question is why does the xcode IDE
seem to think that the word friend
is a keyword/reserved-word?
Presumably because friend
is a reserved word in C++. See Friendship and inheritance.
You could try modifying your xCode settings for the compiler to see if the IDE picks this up. See Can I use C++11 with Xcode?
这篇关于为什么xcode IDE认为`friend'是保留字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!