• 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: scanf prob in PB run window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scanf prob in PB run window


  • Subject: Re: scanf prob in PB run window
  • From: Stefan Wiesendanger <email@hidden>
  • Date: Wed, 30 Jul 2003 02:54:49 +0200

First, don't "Run" but "Debug" your tool.

Then, in PB, you'll want to use the Standard I/O tab, not the Console tab.
In Xcode, chose Show Stdio from the Debug menu.

Without getting to technical now, the Run window (only) shows the so called stderr output stream.
This one is often used to printout error messages (hence the name...).
But if you're doing printf's, these will go to stdout and scanf will take it's input from stdin.

The Console tab in PB when debugging is actually a GDB (debugger) console, so not what you want (you'd use that to control the debugger).

The Standard I/O tab is "simulating" a terminal, so that's what you want. That one is showing stdout (and stderr) and what you're typing in will be stdin for your program.

hope that helps
Stef






On Dienstag, Juli 29, 2003, at 11:05 PM, email@hidden wrote:

Dear list,

This is a newbie question, so bear with me:

Question: Why do my C programs using scanf run perfectly in Terminal but
not in the project builder run window?

More details: I write C programs in project builder using the standard
tool. When the program includes the scanf function, I do not get the desired
prompt in the run window of project builder. However, I do get the desired
prompt when I run the program (which I build in project builder) in Terminal.

Thank you.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >scanf prob in PB run window (From: email@hidden)

  • Prev by Date: Re: Any way to make tab take cell in NSTableView out of edit mode?
  • Next by Date: Re: Button Text Color
  • Previous by thread: Re: scanf prob in PB run window
  • Next by thread: Menu/saving problem
  • Index(es):
    • Date
    • Thread