开发者

error: expected specifier-qualifier-list before 'SearchViewController'

i have a search view controller like below.

@interface SearchViewController : {
TopicRulesViewController *TViewController;
}

i want to move to another view.but i am getting this "error: expected specifier-qualifier-list before 'TopicRulesViewControlle开发者_高级运维r'" what is that error?

thanks in advance


You are missing a superclass after the :


You need to import header where TopicRulesViewController class is declared, or, even better - use forward declaration in header file and import necessary header in implementation file:

//header
@class TopicRulesViewController;

@interface SearchViewController : UIViewController{
    TopicRulesViewController *TViewController;
}

//m-file
#import "TopicRulesViewController.h"
...

P.S. You also miss superclass for SearchViewController class, but that produces different compiler error so I assumed that that was just a typo...

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜