• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: ObjC stdin equivalent? and other questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ObjC stdin equivalent? and other questions


  • Subject: Re: ObjC stdin equivalent? and other questions
  • From: Dave DeLong <email@hidden>
  • Date: Fri, 10 Jun 2011 20:00:28 -0700

On Jun 10, 2011, at 7:56 PM, William Squires wrote:

> 1st question:
>  In regular C, you have the <stdio.h> functions for reading/writing to stdio; printf(), scanf(), etc...
>  In C++, you have cin/cout and the overridden '>>' and '<<' operators.
>  What does ObjC have (besides NSLog() anyway) that C/C++ doesn't?
>  I'm guessing... zilch. You have to use the standard C libraries, right? Or is there an OO way of reading/writing to stdio (and stderr) from a console app? Or use ObjC++...

+[NSFileHandle fileHandleWithStandardInput];
+[NSFileHandle fileHandleWithStandardOutput];
+[NSFileHandle fileHandleWithStandardError];

Cheers,

Dave
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >ObjC stdin equivalent? and other questions (From: William Squires <email@hidden>)

  • Prev by Date: ObjC stdin equivalent? and other questions
  • Next by Date: Re: NSInputStream created from NSData - expected it to close at end of data, did not happen
  • Previous by thread: ObjC stdin equivalent? and other questions
  • Next by thread: Re: ObjC stdin equivalent? and other questions
  • Index(es):
    • Date
    • Thread