// // main.m // // // Created by Darin on 15/11/21. // Copyright © 2015年 darin. All rights reserved. //
#import <Foundation/Foundation.h> #import "XYpoint.h"
int main(int argc, const char * argv[]) { @autoreleasepool { // insert code here... // NSLog(@"Hello, World!");
XYpoint *tmp1 = [XYpoint new]; [tmp1 setX:3]; [tmp1 setY:4]; NSLog(@"XYpoint->_x = %d ,XYpoint->_y = %d ;\n",[tmp1 getX],[tmp1 getY]);
XYpoint *tmp2 = [XYpoint new]; [tmp2 setX:6]; [tmp2 setY:8]; NSLog(@"XYpoint->_x = %d ,XYpoint->_y = %d ;\n",[tmp2 getX],[tmp2 getY]);
NSLog(@"tmpXYpoint->_x = %d ,tmpXYpoint->_y = %d ;\n",[[tmp1 distance:tmp2] getX],[[tmp1 distance:tmp2] getY]); }
return 0; }
|