New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

Object-C Newbie Question


Post Reply New Thread Subscribe

 
Thread Tools
iMarco

 
Member Since: May 17, 2008
Posts: 21
iMarco is on a distinguished road

iMarco is offline
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!
QUOTE Thanks
Raz0rEdge

 
Raz0rEdge's Avatar
 
Member Since: Jul 17, 2009
Location: MA
Posts: 7,729
Raz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant future
Mac Specs: 27" i7 iMac, 24" iMac, 13" Macbook Air, iPhone 5 & 5S, iPod Nano 7th Gen, iPad 2 16GB WiFi, iPad 3

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

Regards
QUOTE Thanks

Post Reply New Thread Subscribe


« AppleScript memory leak, then crash | GCC creates console app »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Newbie question about OS Virtualisation Munkee6002 Switcher Hangout 3 10-15-2009 11:45 AM
Newbie has question about iPhoto doctorxring Switcher Hangout 0 05-14-2006 10:29 PM
mac newbie question (iWeb) Emuleem22 Switcher Hangout 4 03-02-2006 11:03 PM
Newbie Question rsjackman87 Switcher Hangout 4 05-10-2005 03:12 PM
Newbie question on wireless laptop? Big Dog Dad Switcher Hangout 3 06-12-2004 10:03 AM

All times are GMT -4. The time now is 10:10 AM.

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

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?