Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
Object-C Newbie Question
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="iMarco" data-source="post: 937188" data-attributes="member: 56101"><p>Edit: The "Object-C" was a typo, sorry...objective <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /></p><p></p><p>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: </p><p></p><p>#import <Foundation/Foundation.h></p><p></p><p>int main (int argc, const char * argv[]) {</p><p> NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];</p><p></p><p> // insert code here...</p><p> NSLog(@"Hello World");</p><p> NSLog(@"Hello World 2");</p><p> [pool drain];</p><p> return 0;</p><p>}</p><p></p><p>I pressed Build and Go and I got nothing. Was I supposed to get something on the terminal or anything?? Thanks!</p></blockquote><p></p>
[QUOTE="iMarco, post: 937188, member: 56101"] 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]
Verification
Post reply
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
Object-C Newbie Question
Top