fish3129 发表于 2018-5-9 09:07:22

Learn Objective-C on Ubuntu

#include<stdio.h>  /*
  * The next #include line is generallypresent in all Objective-C
  * source files that use GNUstep.TheFoundation.h header file
  * includes all the other standard headerfiles you need.
  */
  #include <Foundation/Foundation.h>
  /*

  * Declare the Test>  */
  @interface Test

  + (const char *) >  @end
  /*

  * Define the Test>  */
  @implementation Test

  +(const char *)>  {

  return &quot;This is the stringvalue of the Test>  }
  @end
  /*

  * The main()function: pass a message to the Test>  * and print the returnedstring.
  */
  int main(void)
  {

  printf(&quot;%s\n&quot;, [Test >  return 0;
  }
页: [1]
查看完整版本: Learn Objective-C on Ubuntu