Mac Forums

Mac Forums (
-   OS X - Development and Darwin (
-   -   Object-C Newbie Question (

iMarco 11-04-2009 03:02 AM

Object-C Newbie Question
Edit: The "Object-C" was a typo, sorry...objective :)

Hello guys, I just got this great book (Programming in Objective-C 2.0) and I'm already working on the typical "hello world" program. I typed in the code, debugging ended normally on Xcode but I didn't get anything on screen. Here's the code:

#import <Foundation/Foundation.h>

int main (int argc, const char * argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];

// insert code here...
NSLog(@"Hello World");
NSLog(@"Hello World 2");
[pool drain];
return 0;

I pressed Build and Go and I got nothing. Was I supposed to get something on the terminal or anything?? Thanks!

Raz0rEdge 11-04-2009 08:02 AM

Open up the console and you'll see your NSLog messages appear there..


All times are GMT -4. The time now is 04:34 PM.

Powered by vBulletin
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.