[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] gcc programming
- Subject: [ale] gcc programming
- From: ale at FultonGreen.com (Fulton Green)
- Date: Sat Jan 22 21:36:21 2005
- In-reply-to: <0bcd01c500f2$91557670$bb00a8c0@Ringo>; from [email protected] on Sat, Jan 22, 2005 at 09:23:40PM -0500
- References: <[email protected]> <0bcd01c500f2$91557670$bb00a8c0@Ringo>
On Sat, Jan 22, 2005 at 09:23:40PM -0500, ringo wrote:
> Is this a good forum for asking programming questions or is there a
> better one for gcc?
Well, if it's good enough for a long Comcast static IP discussion ...
> I don't have my C book on me and I need to print debug info to a text
> file. Does anyone have a code snippet ob how to open a file and print to
> it?
Google for the fprintf() syntax. Use stderr (NOT "stderr") for the first
arg. If you get compile errors, you're probably not including the right
header files.
Then run the program with the usual arguments but also add the following
argument set (assuming you're in a Korn shell or Bash command-line):
2>yourTextFile.txt