⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 index.html

📁 this is a mirrored site c-faq. thought might need offline
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3O//DTD W3 HTML 2.0//EN"><!-- This collection of hypertext pages is Copyright 1995-2005 by Steve Summit. --><!-- Content from the book "C Programming FAQs: Frequently Asked Questions" --><!-- (Addison-Wesley, 1995, ISBN 0-201-84519-9) is made available here by --><!-- permission of the author and the publisher as a service to the community. --><!-- It is intended to complement the use of the published text --><!-- and is protected by international copyright laws. --><!-- The on-line content may be accessed freely for personal use --><!-- but may not be published or retransmitted without explicit permission. --><!-- --><!-- this page built Sat Dec 24 21:47:46 2005 by faqproc version 2.7 --><!-- from source file strangeprob.sgml dated Tue Jun 29 21:44:40 2004 --><!-- corresponding to FAQ list version 4.0 --><html><!-- Mirrored from c-faq.com/strangeprob/index.html by HTTrack Website Copier/3.x [XR&CO'2008], Sat, 14 Mar 2009 07:56:21 GMT --><head><meta name=GENERATOR content="faqproc"><title>Strange Problems</title></head><body bgcolor="#ffffff">&nbsp;<a href="../index-2.html"><img src="../images/buttontop.gif" alt="top/contents"></a><a href="../search.html"><img src="../images/buttonsrch.gif" alt="search"></a><hr><H1>16. Strange Problems</H1><p><a href="emptyloop.html" rel=subdocument>16.1</a>Why is this loop always executing once?<pre>	for(i = start; i &lt; end; i++);		{		printf("%d\n", i);		}</pre></p><p><a href="unclosed.html" rel=subdocument>16.1b</a>I'm getting baffling syntax errors which make no sense at all,and it seems like large chunks of my program aren't being compiled.</p><p><a href="procedure.html" rel=subdocument>16.1c</a>Why isn't my procedure call working?The compiler seems to skip right over it.</p><p><a href="headerglom.html" rel=subdocument>16.2</a>I'm getting strangesyntax errorson the very firstdeclaration ina file,but it looks fine.</p><p><a href="biglocal.html" rel=subdocument>16.3</a>This program crashes before it even runs!(When single-stepping with a debugger, it dies before the firststatement in <TT>main</TT>.)</p><p><a href="crashatexit.html" rel=subdocument>16.4</a>I have a program that seems to run correctly,butitcrashes as it's exiting,<em>after</em>the last statement in <TT>main()</TT>.What could be causing this?</p><p><a href="funnybugs.html" rel=subdocument>16.5</a>This program runs perfectly onone machine,but I get weird results onanother.Stranger still,adding orremoving a debugging printoutchanges the symptoms...</p><p><a href="strlitnomod.html" rel=subdocument>16.6</a>Why doesthis code:<pre>char&nbsp;*p&nbsp;=&nbsp;"hello,&nbsp;world!";p[0]&nbsp;=&nbsp;'H';</pre>crash?</p><p><a href="ptralign.html" rel=subdocument>16.7</a></p><p>I've got some code that's trying to unpack external structures, but it's crashingwith a message about an ``unaligned access.''What does this mean?The code looks like this:<pre>struct mystruct {	char c;	long int i32;	int i16;} s;char buf[7], *p;fread(buf, 7, 1, fp);p = buf;s.c = *p++;s.i32 = *(long int *)p;p += 4;s.i16 = *(int *)p;</pre></p><p><a href="segv.html" rel=subdocument>16.8</a>Whatdo``Segmentation violation'',``Bus error'',and``General protection fault''mean?What's a ``core dump''?</p><hr><p><a href="../index-2.html">top</a></p><p><a href="../questions.html"><img src="../images/buttontop.gif" alt="contents"></a><a href="../search.html"><img src="../images/buttonsrch.gif" alt="search"></a><br><a href="../about.html">about this FAQ list</a>&nbsp;<a href="../eskimo.html">about eskimo</a>&nbsp;<a href="../search.html">search</a>&nbsp;<a href="../feedback.html">feedback</a>&nbsp;<a href="copyright.html">copyright</a><p>Hosted by<a href="http://www.eskimo.com/"><img src="../../www.eskimo.com/img/link/eskitiny.gif" alt="Eskimo North"></a></p></body><!-- Mirrored from c-faq.com/strangeprob/index.html by HTTrack Website Copier/3.x [XR&CO'2008], Sat, 14 Mar 2009 07:56:25 GMT --></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -