I am getting an error for the below program on the data_derived.m
data_derived.m
@implementation requestSession
- (id)init {
self=[super initWithID:ID withData:(id)pData withSize:sizeof(st)];
if (self) {
}
return self;
}
@end
data_derived.h
@interface requestSession : data {
//declarations
}
data.h
- (id)initWithID:(int) uMessageId withData:(id)pData withSize:(size_t) uDataSize;
data.m
- (id) initWithID:(int) uMessageId withData:(id)pData withSize:(size_t) uDataSize {
//stmts;
}
First, by convention class names start with an uppercase character.
Then, in your
initthere are variables namedID,pDataorst. What you probably want to do is either throw an exception here (if the normalinitis not to be used) or provide default values, as in: