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 "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("%s\n", [Test > return 0;
}
页:
[1]