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?
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?
the terminal is stdin (standard in)
Here are some resources:
http://stackoverflow.com/questions/1419444/taking-command-line-input-in-objectiv e-c
the terminal is stdin (standard in)
Here are some resources:
http://stackoverflow.com/questions/1419444/taking-command-line-input-in-objectiv e-c
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
Thanks for this useful information
Read String from Terminal in Objective C...