Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Read String from Terminal in Objective C...

How to read a string from terminal in objective C?

As we can read integer values though scanf function,is there any function to read string from terminal?

Posted on Aug 21, 2013 6:31 AM

Reply
Question marked as Best reply
3 replies
Question marked as Best reply

Aug 21, 2013 9:03 AM in response to abhishek_09

You have two choices. You can a do a C implementation, remember you can write C code your not forced to use Objective-C.


Or if you want an Objective-C solution look at the documentation for NSFileHandle specifically the class method +fileHandleWithStandardInput. Also look in the documentation for Reading and Writing using NSFileHandle and Making Disk Reads at the Posix level.


regards

Read String from Terminal in Objective C...

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.