ObjectC£¬¶ÔÏóºÍ·½·¨ -µçÄÔ×ÊÁÏ

µçÄÔ×ÊÁÏ Ê±¼ä£º2019-01-01 ÎÒҪͶ¸å
¡¾www.unjs.com - µçÄÔ×ÊÁÏ¡¿

    ѧϰObject-C£¬ÂòÁË2±¾Ê飬ÆäÖÐ1±¾ÊÇÓÃC±ÒÂòµÄ£¬×ÜÌåÖÊÁ¿Ò»°ã£¬±È½Ï»ù´¡£¬

ObjectC£¬¶ÔÏóºÍ·½·¨

¡£

    ÁíÍâÒ»±¾ÊÇ£¬·è¿ñ-ÀîÑôдµÄ£¬´ó²¿Í·£¬±È½ÏÏÅÈË£¬±È½ÏÈ«Ò»µã¡£

    ¶ÔÓÚÃæÏò¶ÔÏó£¬Ö®Ç°»¹ÊÇÓиö´ó¸ÅµÄÀí½â£¬ÔÙ¶àµã»ù´¡µÄÀý×Ó¡£

    Ä¿Ç°£¬ÓÃ×Å×ϰ¹ßµÄÊÇ£¬Óжà¸ö²ÎÊýµÄ·½·¨¡£ÕâÒ»µãºÍCϵÁеÄÓïÑÔ£¬ºÜ²»Ò»Ñù£¬×ÅʵÈÃÈËÄÑÊÜ°¡¡£

    ´úÂë

////  main.m//  ObjectPerson////  Created by fansunion on 15/12/3.//  Copyright (c) 2015Äê demo. All rights reserved.//#import<foundation foundation.h="">#import "Person.h"//#import "Person.m"int main(int argc, const char * argv[]) {    @autoreleasepool {        //¹¹Ôì¶ÔÏó        Person* person = [[Person alloc]init];        //µ÷ÓÃ1¸ö²ÎÊýµÄʵÀý·½·¨        [person say:@"I am FansUnion"];        //µ÷ÓÃ2¸ö²ÎÊýµÄʵÀý·½·¨        [person setName: @"СÀ×FansUnion" andAge:26];        //µ÷ÓÃûÓвÎÊýµÄʵÀý·½·¨        [person info];        //µ÷ÓÃûÓвÎÊýµÄÀà·½·¨        [Person bye];             }    return 0;}</foundation>

    ÔËÐнá¹û

    2015-12-03 20:57:39.023 ObjectPerson[6193:440740] I am test method

    2015-12-03 20:57:39.025 ObjectPerson[6193:440740] Hi,I am FansUnion

    2015-12-03 20:57:39.025 ObjectPerson[6193:440740] I am info method

    2015-12-03 20:57:39.025 ObjectPerson[6193:440740] bye bye !

    Program ended with exit code: 0

    Àý×ӱȽϼòµ¥£¬

µçÄÔ×ÊÁÏ

¡¶ObjectC£¬¶ÔÏóºÍ·½·¨¡·(https://www.unjs.com)¡£

    ½ñÌìÏ°àඣ¬À´ÈÕ¼ÌÐø¡£

×îÐÂÎÄÕÂ