views:

50

answers:

2

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 'TopicRulesViewController'" what is that error?

thanks in advance

A: 

You are missing a superclass after the :

Jerry Jones
A: 

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...

Vladimir