I created a class named Data parsing and in this class, I laid out three functions:
The first is getData()
, and it needs to call parseLine()
.
I am calling the parseLine()
method like so:
[self parseline];
However, I am receiving the following error:
Sse of undeclared identifier 'self'
How are my functions in this class suppose to call each other?
void getData(NSString *data) {
while(temp_top < [data length]) {
icc_data[++data_top] = [data characterAtIndex:temp_top];
if (icc_data[data_top]==')' && icc_data[data_top -1]=='\031') { }
if (icc_data[0]!='\031' && icc_data[data_top]=='\n') {
[dataParsing parseLine];
}
}
}
You are implementing void getData(NSString *data)
as a C function. Functions do not get a reference to self
. Use a method instead:
- (void)data
{
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With