错误之前的预期说明符限定符列表

时间:2011-06-29 14:11:52

标签: objective-c ios list specifier

#import <UIKit/UIKit.h>
#import "NotepadViewController.h"
#import "NotesTableViewController.h"
#import "NoteInformationTransferProtocol.h"

@interface NotesViewController : UIViewController <NoteInformationTransferProtocol>
{
    UITextField *_noteTitleTextField;
    UIButton *_addButton;
    UITextField *_description;
    UIView *_notesTableView;

    NotepadViewController * _notepadVC;
    NotesTableViewController *_noteTableVC;        
}

我在“NotepadViewController * _notepadVC”上收到错误“Expect specifier-qualifier-list before NotepadViewController”我已经导入了该类的标题,因此它应该将其检测为类型,对吗?

1 个答案:

答案 0 :(得分:0)

当您没有向目标添加框架或文件时,通常会发生该错误,您正在构建的目标中是“NotepadViewController.h”吗?

在xCode 4中,您可以通过展开Build Phases中的“Compile Sources”部分来检查这一点。 在xCode 3中,您可以使用“获取信息”来查看包含该文件的目标(如果我的记忆为我提供的话)

相关问题