have problem for objective-c which is used on iphone

Discussion in 'iOS Programming' started by vavdiyaharesh, May 15, 2008.

  1. macrumors newbie

    Joined:
    May 15, 2008
    #1
    Hello everyone

    Right now i am learning objective-c because i have to develop one web application for iphone.

    I cant understand that how can i print string in objective-c and meaning of "NSLog" and their syntax

    Pls help me its urgent

    Thanking you.
     
  2. macrumors 68000

    crees!

    Joined:
    Jun 14, 2003
    Location:
    MD/VA/DC
    #2
    I am *just* learning Objective-C. Luckily, I took a C (and C++) class years ago and it's all coming back to me as I read on. And from what I've read, haven't programmed yet, it should be.

    NSLog(@"something to output");

    Also, I believe you need to include the Foundation framework (I think). That's where NSLog is hiding out.

    If you're referencing variables the syntax is a little different. Check out cocoadevcentral.com. I also downloaded a PDF called Become an XCoder. It was linked in one of the threads under Programming recently. Also, books are valuable too. Check out Amazon.
     
  3. thread starter macrumors newbie

    Joined:
    May 15, 2008
    #3
    thank your reply
    i know that nslog is about for printing something but syntax of nslog i cant understand. means where can i use NSLog and so what is difference between NSLog and printf.....
     

Share This Page