Objective-C错误:在'class'之前预期'=',',',';','asm'或'__attribute__' [英] Objective-C error: expected '=', ',', ';', 'asm' or '__attribute__' before 'class'

查看:102
本文介绍了Objective-C错误:在'class'之前预期'=',',',';','asm'或'__attribute__'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从我正在处理的iPhone应用程序中获取此信息。不知道如何解释错误...它在我的代码中的几个地方被抛出。我看不到任何发生的模式。

I'm getting this from an iPhone app I'm working on. Not sure how to interpret the error... It's thrown at a few place in my code. I can't see any pattern of occurrence.

这是一般错误吗?这是什么意思?

Is this a generic error? What's the meaning of it?

推荐答案

您发布的错误表明您使用<$ c $时出现语法错误C>类。手动检查报告错误的第一个位置,您可能会注意到原因。

The error you posted indicates that you have a syntax error around your use of class. Manually inspect the first location the error is reported, and you might notice the cause.

为了帮助您进一步调试,请包含周围的代码,以便我们更好地为您提供帮助。

To help you debug further, please include the surrounding code so we can better help you.

最常见原因:


  1. 错过 @ in @class 用于标题中的转发类声明

  2. 错过; 声明枚举,结构或typedef之后

  3. 复制的C ++代码,其中 class 用于声明一个结构,但代码在Objective-C中无效

  1. Missed @ in @class for forward class declaration in headers
  2. Missed ; after the declaration of an enum, a structure, or a typedef
  3. Copied C++ code, where class is used to declare a structure, but code is invalid in Objective-C

这篇关于Objective-C错误:在'class'之前预期'=',',',';','asm'或'__attribute__'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆