Here is with the @autoreleasepool and it's working. I still couldn't figure out why I get the message "Incomplete implementation". If anyone finds out please let me know.
//.…@interface section…………..
@interface XYPoint: NSObject
{
int coordX;
int coordY;
}
-(void) print;
-(void) setCoordX: (int) x;
-(void) setCoordY: (int) y;
-(int) coordX;
-(int) coordY;
@end
//.…@implementation section…………..
@implementation XYPoint
-(void) print
{
NSLog (@ "(%i,%i)", coordX, coordY);
}
-(void) setCoordX: (int) x
{
coordX = x;
}
-(void) setCoordY: (int) y
{
coordY = y;
}
@end
// …program section………………
int main (int argc, char *argv[])
{
@autoreleasepool
{
XYPoint *myXYPoint1 = [ [ XYPoint alloc] init ];
XYPoint *myXYPoint2 = [ [ XYPoint alloc] init ];
// Set first point with coordinates (5,

[myXYPoint1 setCoordX: 5];
[myXYPoint1 setCoordY: 8];
//Set second point with coordinates (-3,-11)
[myXYPoint2 setCoordX: -3];
[myXYPoint2 setCoordY: -11];
// Display the point
{
NSLog (@"The coordinates of the first point are:");
[myXYPoint1 print];
NSLog (@"The coordinates of the second point are:");
[myXYPoint2 print];
}
return 0;
}
}