Re: ObjC stdin equivalent? and other questions
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