• 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: Newbie C Questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie C Questions


  • Subject: Re: Newbie C Questions
  • From: Markus Hitter <email@hidden>
  • Date: Wed, 30 Jan 2002 11:16:09 +0100

Am Mittwoch den, 30. Januar 2002, um 05:28, schrieb Ross Hayden:

In particular, the code you included in your Cocoa-Dev post, uses the function calls printf() and scanf(). Those functions are designed to read from a terminal interface, and not from a graphics interface such as that provided in PB. That is why your code doesn't run in PB.

The code runs excellently in PB. If you enter the numbers blindly, you'll see the program working fine.

Project Builder provides a command line as well. He just needs to call a fflush(stdout); or fflush(NULL); after each printf(); to "enhance" the appearance.

There are other situation where automatic flushing doesn't work as well: i.e. if your app sends the text to a remote app.


The overhead of writing a graphics-capable application may hinder your presently developing C skills. A terminal interface is much simpler, allowing you to focus your mental energy mostly on C and not Cocoa.

Using Cocoa, the overhead is really small. Using the CurrentcyConverter Tutorial included with Developer Tools, he could have made the same app with even less code.

For other GUI Frameworks like Carbon, X11, Visual dingsda, I agree completely.


Just my 0.02

Markus

- - - - - - - - - - - - - - - - - - -
Dipl. Ing. Markus Hitter
http://www.jump-ing.de/


References: 
 >Re: Newbie C Questions (From: Ross Hayden <email@hidden>)

  • Prev by Date: NSScrollView: why won't it scroll?
  • Next by Date: Printable area
  • Previous by thread: Re: Newbie C Questions
  • Next by thread: Re: Newbie C Questions
  • Index(es):
    • Date
    • Thread