亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ch01.htm

?? good book for learning c++ standard language
?? HTM
?? 第 1 頁 / 共 3 頁
字號:
Cycle</FONT></H3>
<P>If every program worked the first time you tried it, that would be the complete
development cycle: Write the program, compile the source code, link the program,
and run it. Unfortunately, almost every program, no matter how trivial, can and will
have errors, or bugs, in the program. Some bugs will cause the compile to fail, some
will cause the link to fail, and some will only show up when you run the program.</P>
<P>Whatever type of bug you find, you must fix it, and that involves editing your
source code, recompiling and relinking, and then rerunning the program. This cycle
is represented in Figure 1.1, which diagrams the steps in the development cycle.<BR>
<BR>
<A NAME="Heading18"></A><A HREF="javascript:if(confirm('http://petunia.atomki.hu/pio/Manuals/english/0-672/0-672-31070-8/art/ch01/01zcp01.jpg  \n\nThis file was not retrieved by Teleport Pro, because the server reports that this file cannot be found.  \n\nDo you want to open it from the server?'))window.location='http://petunia.atomki.hu/pio/Manuals/english/0-672/0-672-31070-8/art/ch01/01zcp01.jpg'" tppabs="http://petunia.atomki.hu/pio/Manuals/english/0-672/0-672-31070-8/art/ch01/01zcp01.jpg"><FONT COLOR="#000077">Figure
1.1.</FONT></A><FONT COLOR="#000077"> </FONT><I>The steps in the development of a
C++ program.</I>
<H3 ALIGN="CENTER"><A NAME="Heading19"></A><FONT COLOR="#000077">HELLO.CPPYour First
C++ Program</FONT></H3>
<P>Traditional programming books begin by writing the words <TT>Hello World</TT>
to the screen, or a variation on that statement. This time-honored tradition is carried
on here.</P>
<P>Type the first program directly into your editor, exactly as shown. Once you are
certain it is correct, save the file, compile it, link it, and run it. It will print
the words <TT>Hello World</TT> to your screen. Don't worry too much about how it
works, this is really just to get you comfortable with the development cycle. Every
aspect of this program will be covered over the next couple of days.


<BLOCKQUOTE>
	<P>
<HR>
<FONT COLOR="#000077"><B>WARNING: </B></FONT>The following listing contains line
	numbers on the left. These numbers are for reference within the book. They should
	not be typed in to your editor. For example, in line 1 of Listing 1.1, you should
	enter:</P>
	<PRE><FONT COLOR="#0066FF">#include &lt;iostream.h&gt;</FONT></PRE>
	<P>
<HR>


</BLOCKQUOTE>

<PRE></PRE>
<P><A NAME="Heading20"></A><FONT SIZE="4" COLOR="#000077"><B>Listing 1.1. HELLO.CPP,
the Hello World program.</B></FONT><FONT COLOR="#0066FF"></FONT>
<PRE><FONT COLOR="#0066FF">1: #include &lt;iostream.h&gt;
2:
3: int main()
4: {
5:    cout &lt;&lt; &quot;Hello World!\n&quot;;
6:        return 0;
<TT>7: }</TT></FONT> 
</PRE>
<P>Make certain you enter this exactly as shown. Pay careful attention to the punctuation.
The <TT>&lt;&lt;</TT> in line 5 is the redirection symbol, produced on most keyboards
by holding the Shift key and pressing the comma key twice. Line 5 ends with a semicolon;
don't leave this off!</P>
<P>Also check to make sure you are following your compiler directions properly. Most
compilers will link automatically, but check your documentation. If you get errors,
look over your code carefully and determine how it is different from the above. If
you see an error on line 1, such as <TT>cannot find file iostream.h</TT>, check your
compiler documentation for directions on setting up your <TT>include</TT> path or
environment variables. If you receive an error that there is no prototype for <TT>main</TT>,
add the line <TT>int main();</TT> just before line 3. You will need to add this line
before the beginning of the <TT>main</TT> function in every program in this book.
Most compilers don't require this, but a few do.</P>
<P>Your finished program will look like this:</P>
<PRE><FONT COLOR="#0066FF">1: #include &lt;iostream.h&gt;
2:
3:
4: int main();
5: {
6: cout &lt;&lt;&quot;Hello World!\n&quot;;
7:     return 0;
8: }
</FONT></PRE>
<P>Try running <TT>HELLO.EXE</TT>; it should write</P>
<PRE><FONT COLOR="#0066FF">Hello World!
</FONT></PRE>
<P>directly to your screen. If so, congratulations! You've just entered, compiled,
and run your first C++ program. It may not look like much, but almost every professional
C++ programmer started out with this exact program.
<H3 ALIGN="CENTER"><A NAME="Heading21"></A><FONT COLOR="#000077">Compile Errors</FONT></H3>
<P>Compile-time errors can occur for any number of reasons. Usually they are a result
of a typo or other inadvertent minor error. Good compilers will not only tell you
what you did wrong, they'll point you to the exact place in your code where you made
the mistake. The great ones will even suggest a remedy!</P>
<P>You can see this by intentionally putting an error into your program. If <TT>HELLO.CPP</TT>
ran smoothly, edit it now and remove the closing brace on line 6. Your program will
now look like Listing 1.2.</P>

<P><A NAME="Heading22"></A><FONT SIZE="4" COLOR="#000077"><B>Listing 1.2. Demonstration
of compiler error.</B></FONT>
<PRE><FONT COLOR="#0066FF">1: #include &lt;iostream.h&gt;
2:
3: int main()
4: {
5:    cout &lt;&lt; &quot;Hello World!\n&quot;;
<TT>6: return 0;</TT></FONT> </PRE>
<P><BR>
Recompile your program and you should see an error that looks similar to the following:</P>
<PRE><FONT COLOR="#0066FF">Hello.cpp, line 5: Compound statement missing terminating } in function main().
</FONT></PRE>
<P>This error tells you the file and line number of the problem, and what the problem
is (although I admit it is somewhat cryptic). Note that the error message points
you to line 5. The compiler wasn't sure if you intended to put the closing brace
before or after the <TT>cout</TT> statement on line 5. Sometimes the errors just
get you to the general vicinity of the problem. If a compiler could perfectly identify
every problem, it would fix the code itself.
<H3 ALIGN="CENTER"><A NAME="Heading24"></A><FONT COLOR="#000077">Summary</FONT></H3>
<P>After reading this chapter, you should have a good understanding of how C++ evolved
and what problems it was designed to solve. You should feel confident that learning
C++ is the right choice for anyone interested in programming in the next decade.
C++ provides the tools of object-oriented programming and the performance of a systems-level
language, which makes C++ the development language of choice.</P>
<P>Today you learned how to enter, compile, link, and run your first C++ program,
and what the normal development cycle is. You also learned a little of what object-oriented
programming is all about. You will return to these topics during the next three weeks.
<H3 ALIGN="CENTER"><A NAME="Heading25"></A><FONT COLOR="#000077">Q&amp;A</FONT></H3>

<DL>
	<DD><B>Q. What is the difference between a text editor and a word processor?</B><BR>
	<BR>
	<B>A.</B> A text editor produces files with plain text in them. There are no formatting
	commands or other special symbols required by a particular word processor. Text files
	do not have automatic word wrap, bold print, italics, and so forth.<BR>
	<BR>
	<B>Q. If my compiler has a built-in editor, must I use it?</B><BR>
	<BR>
	<B>A.</B> Almost all compilers will compile code produced by any text editor. The
	advantages of using the built-in text editor, however, might include the ability
	to quickly move back and forth between the edit and compile steps of the development
	cycle. Sophisticated compilers include a fully integrated development environment,
	allowing the programmer to access help files, edit, and compile the code in place,
	and to resolve compile and link errors without ever leaving the environment.<BR>
	<BR>
	<B>Q. Can I ignore warning messages from my compiler?</B><BR>
	<BR>
	<B>A.</B> Many books hedge on this one, but I'll stake myself to this position: No!
	Get into the habit, from day one, of treating warning messages as errors. C++ uses
	the compiler to warn you when you are doing something you may not intend. Heed those
	warnings, and do what is required to make them go away.<BR>
	<BR>
	<B>Q. What is compile time?</B><BR>
	<BR>
	<B>A.</B> Compile time is the time when you run your compiler, as opposed to link
	time (when you run the linker) or run-time (when running the program). This is just
	programmer shorthand to identify the three times when errors usually surface.
</DL>

<H3 ALIGN="CENTER"><A NAME="Heading26"></A><FONT COLOR="#000077">Workshop</FONT></H3>
<P>The Workshop provides quiz questions to help you solidify your understanding of
the material covered and exercises to provide you with experience in using what you've
learned. Try to answer the quiz and exercise questions before checking the answers
in Appendix D, and make sure you understand the answers before continuing to the
next chapter.
<H4 ALIGN="CENTER"><A NAME="Heading27"></A><FONT COLOR="#000077">Quiz</FONT></H4>

<DL>
	<DD><B>1.</B> What is the difference between an interpreter and a compiler?<BR>
	<BR>
	<B>2.</B> How do you compile the source code with your compiler?<BR>
	<BR>
	<B>3.</B> What does the linker do?<BR>
	<BR>
	<B>4.</B> What are the steps in the normal development cycle?
</DL>

<H4 ALIGN="CENTER"><A NAME="Heading28"></A><FONT COLOR="#000077">Exercises</FONT></H4>

<DL>
	<DD><B>1.</B> Look at the following program and try to guess what it does without
	running it.
</DL>

<PRE><FONT COLOR="#0066FF">1: #include &lt;iostream.h&gt;
2: int main()
3: {
4: int x = 5;
5: int y = 7;
6: cout &quot;\n&quot;;
7: cout &lt;&lt; x + y &lt;&lt; &quot; &quot; &lt;&lt; x * y;
8: cout &quot;\n&quot;;
9:return 0;
10: }
</FONT></PRE>

<DL>
	<DD><B>2.</B> Type in the program from Exercise 1, and then compile and link it.
	What does it do? Does it do what you guessed?<BR>
	<BR>
	<B>3.</B> Type in the following program and compile it. What error do you receive?
</DL>

<PRE><FONT COLOR="#0066FF">1: include &lt;iostream.h&gt;
2: int main()
3: {
4: cout &lt;&lt; &quot;Hello World\n&quot;;
5: return 0;
6: }
</FONT></PRE>

<DL>
	<DD><B>4.</B> Fix the error in the program in Exercise 3, and recompile, link, and
	run it. What does it do?
	<CENTER>
	<DD><BR>
	<BR>
	<BR>
	<A HREF="fm.htm" tppabs="http://petunia.atomki.hu/pio/Manuals/english/0-672/0-672-31070-8/htm/fm.htm"><IMG SRC="../buttons/BLANPREV.GIF" tppabs="http://petunia.atomki.hu/pio/Manuals/english/0-672/0-672-31070-8/buttons/BLANPREV.GIF" WIDTH="37"
	HEIGHT="37" ALIGN="BOTTOM" BORDER="0"></A><A HREF="javascript:if(confirm('http://www.mcp.com/sams  \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address.  \n\nDo you want to open it from the server?'))window.location='http://www.mcp.com/sams'" tppabs="http://www.mcp.com/sams"><IMG
	SRC="../buttons/BLANHOME.GIF" tppabs="http://petunia.atomki.hu/pio/Manuals/english/0-672/0-672-31070-8/buttons/BLANHOME.GIF" WIDTH="37" HEIGHT="37" ALIGN="BOTTOM"
	BORDER="0"></A><A HREF="../index.htm" tppabs="http://petunia.atomki.hu/pio/Manuals/english/0-672/0-672-31070-8/index.htm"><IMG SRC="../buttons/BLANTOC.GIF" tppabs="http://petunia.atomki.hu/pio/Manuals/english/0-672/0-672-31070-8/buttons/BLANTOC.GIF"
	WIDTH="37" HEIGHT="37" ALIGN="BOTTOM" BORDER="0"></A><A HREF="ch02.htm" tppabs="http://petunia.atomki.hu/pio/Manuals/english/0-672/0-672-31070-8/htm/ch02.htm"><IMG SRC="../buttons/BLANNEXT.GIF" tppabs="http://petunia.atomki.hu/pio/Manuals/english/0-672/0-672-31070-8/buttons/BLANNEXT.GIF"
	WIDTH="37" HEIGHT="37" ALIGN="BOTTOM" BORDER="0"></A><A HREF="#heading1"><IMG SRC="../buttons/BLANTOP.GIF" tppabs="http://petunia.atomki.hu/pio/Manuals/english/0-672/0-672-31070-8/buttons/BLANTOP.GIF"
	WIDTH="37" HEIGHT="37" ALIGN="BOTTOM" BORDER="0"></A></CENTER>
</DL>



</BODY>

</HTML>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
制服丝袜亚洲色图| 91久久精品国产91性色tv| 一区二区三区精品在线| 日韩欧美亚洲国产另类| 欧美视频精品在线| 在线一区二区视频| 在线观看日韩一区| 日本道精品一区二区三区| 97精品久久久午夜一区二区三区 | 国产精品日产欧美久久久久| 精品国产免费人成电影在线观看四季| 欧美天堂一区二区三区| 色婷婷综合久色| 91亚洲国产成人精品一区二三| 国产+成+人+亚洲欧洲自线| 精品一区二区三区av| 蜜臀国产一区二区三区在线播放 | 欧美日本在线一区| 91精品国产麻豆| 日韩视频在线你懂得| 精品乱人伦小说| 中文字幕精品综合| 亚洲另类在线视频| 午夜在线成人av| 久久成人久久鬼色| 不卡视频一二三| 欧美日韩另类国产亚洲欧美一级| 9191久久久久久久久久久| 精品国产一二三| 国产精品国产三级国产专播品爱网| 一区在线中文字幕| 无码av免费一区二区三区试看| 另类调教123区| av欧美精品.com| 欧美日韩精品久久久| 91精品国产色综合久久久蜜香臀| 欧美日本国产视频| 国产日韩欧美激情| 亚洲少妇最新在线视频| 亚洲麻豆国产自偷在线| 亚洲成人动漫av| 午夜精品在线视频一区| 青青青伊人色综合久久| 国产乱码一区二区三区| 日本美女视频一区二区| 日韩av在线播放中文字幕| 美女www一区二区| 国产精品一区二区久久不卡 | 不卡一二三区首页| 91在线观看成人| 欧美另类久久久品| 26uuu色噜噜精品一区| 国产日韩欧美高清| 久久精品欧美一区二区三区不卡| 亚洲国产三级在线| 激情五月婷婷综合| 99久久免费精品高清特色大片| 欧美在线不卡一区| 精品日韩一区二区三区免费视频| 欧美国产日韩一二三区| 性做久久久久久久免费看| 国产剧情一区在线| 在线观看国产日韩| 国产日韩亚洲欧美综合| 亚洲一区二区三区四区五区中文| 精品在线一区二区三区| 色屁屁一区二区| 精品久久国产97色综合| 亚洲精品久久7777| 韩国成人精品a∨在线观看| av在线一区二区三区| 欧美经典一区二区三区| 日韩专区在线视频| 91碰在线视频| 亚洲精品在线电影| 午夜精品久久久久久久99樱桃| 国产成人欧美日韩在线电影| 欧美一级片在线| 一区二区三区美女视频| 国产成人免费9x9x人网站视频| 欧美精品丝袜中出| 一区二区三区四区五区视频在线观看| 国产在线精品视频| 91麻豆精品国产91久久久使用方法 | 国产sm精品调教视频网站| 欧美日韩久久久| 国产午夜亚洲精品午夜鲁丝片| 亚洲福利视频三区| 色婷婷久久一区二区三区麻豆| 久久综合九色综合欧美98| 亚洲成人精品一区| 欧美性猛交xxxxxx富婆| 亚洲裸体在线观看| 成人午夜私人影院| 久久综合久久综合亚洲| 麻豆极品一区二区三区| 欧美美女一区二区三区| 亚洲女人的天堂| 99久久国产综合精品女不卡| 国产精品色在线观看| 成人黄色小视频在线观看| 中文字幕免费一区| 成人一区二区在线观看| 久久久青草青青国产亚洲免观| 精品一区二区三区在线观看| 欧美不卡在线视频| 麻豆精品在线观看| 久久美女艺术照精彩视频福利播放| 日韩精品午夜视频| 精品国内片67194| 国产精品911| 国产精品久久久久久久久免费丝袜 | 亚洲福利视频一区二区| 欧美性色黄大片手机版| 亚洲一区中文日韩| 51午夜精品国产| 久久99国产精品免费网站| 精品av久久707| 国产成人综合网站| 亚洲精品视频在线| 欧美二区三区91| 国产精品一区不卡| 久久久久久久免费视频了| 国产精品1024久久| 国产精品久久毛片| 欧美视频精品在线| 精品在线观看免费| 欧美高清在线一区| 色成人在线视频| 美女视频一区在线观看| 国产欧美一区二区精品仙草咪| 粉嫩绯色av一区二区在线观看| 亚洲免费在线电影| 日韩欧美国产小视频| 成人久久视频在线观看| 中文字幕一区av| 欧美日韩三级在线| 99久久精品免费看| 美女mm1313爽爽久久久蜜臀| 欧美国产一区视频在线观看| 欧美午夜电影在线播放| 国产伦精品一区二区三区视频青涩| 国产精品视频yy9299一区| 日韩欧美一级二级| 在线看国产一区二区| 精品一区二区国语对白| 亚洲黄色av一区| 久久久精品人体av艺术| 欧美色图一区二区三区| 国产成人av资源| 日韩精品电影在线观看| 中文字幕在线一区免费| 777午夜精品视频在线播放| 国产福利一区在线观看| 日韩精品一级中文字幕精品视频免费观看 | 成人av高清在线| 日韩电影在线观看网站| 亚洲色图制服诱惑 | 日本在线播放一区二区三区| 亚洲欧洲日韩在线| 久久久久久**毛片大全| 欧美一区二区三区四区久久| 97成人超碰视| 韩日av一区二区| 日本女人一区二区三区| 亚洲一区在线电影| 18成人在线观看| 中文字幕高清一区| 久久久久久久久久久电影| 日韩视频免费直播| 91精品国产乱| 91麻豆精品国产91久久久久久久久 | 久久夜色精品一区| 日韩三级精品电影久久久| 在线成人免费观看| 欧美人成免费网站| 色呦呦一区二区三区| 欧日韩精品视频| 欧日韩精品视频| 色欧美片视频在线观看| 色婷婷激情综合| 色婷婷激情一区二区三区| 91香蕉视频mp4| 欧美无砖专区一中文字| 678五月天丁香亚洲综合网| 51午夜精品国产| 欧美精品一区视频| 国产午夜精品一区二区三区嫩草 | 国产一区二区三区免费在线观看 | 欧美三级中文字幕| 欧美日韩视频专区在线播放| 欧美一a一片一级一片| 欧美这里有精品| 91麻豆精品国产自产在线| 欧美电影一区二区| 久久亚洲一级片| 国产精品入口麻豆原神| 亚洲欧美另类小说| 五月天激情综合| 蜜臀99久久精品久久久久久软件|