Jump to content
  • Advertisement
Sign in to follow this  
MDMcNeil

Objective-C Command Line

This topic is 2169 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey guys!

I'm working in Objective-C at the moment as i am too broke to buy any C# books and instead of working with Cocoa for a graphical app at present, I am trying to get the basics down in a command line app.

My question is: Is there any way to get input from a command line app, or is it all just output? cin and cout from C++ don't work, but printf does from C.

Basically, I just want to be able to have a user type in a word, check it against a switch and output a string. Pretty simple, considering what Objective-C and C++ can do. I'm just hitting a wall that my current book doesn't overcome.

Or if anyone has any simple explanation of how ot connect a button to my code in Xcode for a cocoa app, that'd work too!

Thanks guys!

Share this post


Link to post
Share on other sites
Advertisement
Lol, thanks ChaosEngine!

I had done a brief scan of the web for an answer, but I could probably be given the title of World's Worst Googler and found nothing the first couple attempts. I have since found that scanf works, I just gotta remember how to use it for strings.

Share this post


Link to post
Share on other sites
Objective-C compiler accepts C.

It is best for you to learn Objective-C by building a Cocoa App for the Mac or an iOS app.
The command-line app you are building is just C at the end.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!