[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
- <!--x-content-type: text/plain -->
- <!--x-date: Sat Jan 22 21:36:21 2005 -->
- <!--x-from-r13: nyr ng ThygbaUerra.pbz (Thygba Uerra) -->
- <!--x-message-id: [email protected] -->
- <!--x-reference: [email protected] -->
- <!--x-reference: 0bcd01c500f2$91557670$bb00a8c0@Ringo --> "http://www.w3.org/TR/html4/loose.dtd">
- <!--x-subject: [ale] gcc programming -->
- <li><em>date</em>: Sat Jan 22 21:36:21 2005</li>
- <li><em>from</em>: ale at FultonGreen.com (Fulton Green)</li>
- <li><em>in-reply-to</em>: <0bcd01c500f2$91557670$bb00a8c0@Ringo>; from [email protected] on Sat, Jan 22, 2005 at 09:23:40PM -0500</li>
- <li><em>references</em>: <<a href="msg00870.html">[email protected]</a>> <0bcd01c500f2$91557670$bb00a8c0@Ringo></li>
- <li><em>subject</em>: [ale] gcc programming</li>
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
</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00870" href="msg00870.html">[ale] comcast static IP?</a></strong>
<ul><li><em>From:</em> pete.hardie at gmail.com (Pete Hardie)</li></ul></li>
<li><strong><a name="00872" href="msg00872.html">[ale] gcc programming</a></strong>
<ul><li><em>From:</em> ringo at margaritasrus.com (ringo)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00875.html">[ale] comcast static IP?</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00877.html">[ale] comcast static IP?</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00872.html">[ale] gcc programming</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00880.html">[ale] gcc programming</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00876"><strong>Date</strong></a></li>
<li><a href="threads.html#00876"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>
<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>