Hi,
why isn't it possible in Cocoa that two Classes both import each other? I tried the following code:
Controller.h:
#import <Cocoa/Cocoa.h>
#import "Model.h"
@interface Controller : NSObject {
Model *model;
}
@end
Model.h:
#import <Cocoa/Cocoa.h>
#import "Controller.h"
@interface Model : NSObject {
Controller *controller;
}
@end
which raises the following exceptions:
error: expected specifier-qualifier-list before 'Controller'
error: expected specifier-qualifier-list before 'Model'
Can someone please explain why this is?
Thanks! xonic