Tutorial 1-4: More Variables
On April - 14 - 2009 1 COMMENT
In this tutorial, I will be showing you a couple more ways to use variables.
Open your “Hello World” project from the previous tutorials, and open the “Hello World.m” file to start editing. Edit the program so it looks like this:
#import <foundation /Foundation.h> int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; int age; int fingers; age = 99; fingers = 10; NSLog(@"I am %i years old and I have %i fingers!", age, fingers); [pool drain]; return 0; }</foundation>