I’m trying to return a double from another object then store that into a new double but i’m getting the error incompatible types in initialization. What am I missing here?
double gradePoints = 0.0;
double other = [aCourse getGradePoints];
gradePoints = gradePoints + other;
This is in my other object
- (double) getGradePoints{
return 12.0;
}
Most likely you have forgotten to add the getGradePoints method to an interface declaration: This will result in the method being implicitly declared as -(id)getGradePoints; resulting in the warning you are seeing.