Created
November 12, 2013 14:53
-
-
Save qnoid/7432138 to your computer and use it in GitHub Desktop.
To quickly try a snippet of code in objective-c using clang from the command line. 1. Create a "main.m" file (see example below) 2. Compile using "clang -o main main.m -lobjc -framework Foundation" 3. Run "./main"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
int main(int argc, char *argv[]) | |
{ | |
NSArray *array = @[ @"a", @"b", @"c" ]; | |
for (NSUInteger i = 0; i < array.count; i++) | |
{ | |
NSLog(@"%@", array[i]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment