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

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

?? apa.htm

?? 21天學會VC的英文版
?? HTM
?? 第 1 頁 / 共 5 頁
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"><HTML><HEAD>	<META HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=iso-8859-1"><SCRIPT LANGUAGE="JavaScript"><!--function popUp(pPage) { var fullURL = document.location; var textURL = fullURL.toString(); var URLlen = textURL.length; var lenMinusPage = textURL.lastIndexOf("/"); lenMinusPage += 1; var fullPath = textURL.substring(0,lenMinusPage); popUpWin = window.open('','popWin','resizable=yes,scrollbars=no,width=525,height=394'); figDoc= popUpWin.document; zhtm= '<HTML><HEAD><TITLE>' + pPage + '</TITLE>'; zhtm += '</head>'; zhtm += '<BODY bgcolor="#FFFFFF">'; zhtm += '<IMG SRC="' + fullPath + pPage + '">'; zhtm += '<P><B>' + pPage + '</B>'; zhtm += '</BODY></HTML>'; window.popUpWin.document.write(zhtm); window.popUpWin.document.close(); // Johnny Jackson 4/28/98 }//-->                                                                </SCRIPT><link rel="stylesheet" href="/includes/stylesheets/ebooks.css">	<META NAME="GENERATOR" Content="Symantec Visual Page Mac 1.1.1">	<TITLE>Teach Yourself Visual C++ 6 in 21 Days -- Appendix A -- C++ Review</TITLE></HEAD><BODY TEXT="#000000" BGCOLOR="#FFFFFF"><H1 ALIGN="CENTER"><IMG SRC="../button/sams.gif" WIDTH="171" HEIGHT="66" ALIGN="BOTTOM"BORDER="0"><BR>Teach Yourself Visual C++ 6 in 21 Days</H1><CENTER><P><A HREF="../ch21/ch21.htm"><IMG SRC="../button/previous.gif" WIDTH="128" HEIGHT="28"ALIGN="BOTTOM" ALT="Previous chapter" BORDER="0"></A><A HREF="../apb/apb.htm"><IMGSRC="../button/next.gif" WIDTH="128" HEIGHT="28" ALIGN="BOTTOM" ALT="Next chapter"BORDER="0"></A><A HREF="../index.htm"><IMG SRC="../button/contents.gif" WIDTH="128"HEIGHT="28" ALIGN="BOTTOM" ALT="Contents" BORDER="0"></A> <HR></CENTER><H1 ALIGN="CENTER">- A -<BR>C++ Review</H1><H1></H1><UL>	<LI><A HREF="#Heading1">Creating Your First Application</A>	<UL>		<LI><A HREF="#Heading2">Helloworld.cpp</A>		<LI><A HREF="#Heading3">The if Statement, Operators, and Polymorphism</A>		<LI><A HREF="#Heading4">Global and Local Variables</A>	</UL>	<LI><A HREF="#Heading5">Pointers</A>	<UL>		<LI><A HREF="#Heading6">References</A>	</UL>	<LI><A HREF="#Heading7">Classes</A>	<UL>		<LI><A HREF="#Heading8">Constructors and Destructors</A>	</UL>	<LI><A HREF="#Heading9">Inheritance</A>	<LI><A HREF="#Heading10">Summary</A></UL><P><HR SIZE="4"><BR>The appendix is designed to provide you with a quick review of the fundamentals ofthe C++ programming language. After reading this appendix, you will have a thoroughunderstanding of the various aspects of C++ and its syntax.</P><P><H2><A NAME="Heading1"></A>Creating Your First Application</H2><P>Your first example is a simple program that displays &quot;Hello World&quot; onthe screen. For this, you create a workspace and the C++ file required for the program.The procedure for writing a C++ program using Visual C++ is simple and easy. Followthese steps:</P><DL>	<DT></DT>	<DD><B>1. </B>From the main menu, select Visual C++.	<P>	<DT></DT>	<DD><B>2. </B>Select File | New from the Visual C++ toolbar.	<P>	<DT></DT>	<DD>Make sure the Projects tab is selected (see Figure A.1).	<P>	<DT></DT>	<DD><B>3. </B>Select Win32 Console Application from the options on the left.	<P></DL><P><A HREF="javascript:popUp('0afig01.gif')"><B>FIGURE A.1.</B></A><B> </B><I>Settingup the Hello workspace.</I></P><DL>	<DT><I></I></DT>	<DD><B>4. </B>Type <B>Hello</B> on the right side under Project Name.	<P>	<DT></DT>	<DD><B>5. </B>Select OK.	<P></DL><P>Visual C++ creates the workspace of your application. Visual C++ actually createsa directory Hello, which enables you to store all files related to a particular projectin one area. You will begin adding the files you require for this project:</P><DL>	<DT></DT>	<DD><B>1. </B>Once again, select File | New from the toolbar.	<P>	<DT></DT>	<DD><B>2. </B>Select the Files tab if it is not already selected.	<P>	<DT></DT>	<DD><B>3. </B>Highlight C++ Source File.	<P>	<DT></DT>	<DD><B>4. </B>Check the Add to Project box on the right side.	<P>	<DT></DT>	<DD><B>5. </B>In the File Name edit box, type <B>Helloworld</B> (see Figure A.2).	<P>	<DT></DT>	<DD><B>6. </B>Click OK.	<P></DL><P><A HREF="javascript:popUp('0afig02.gif')"><B>FIGURE A.2.</B></A><B> </B><I>Settingup the Helloworld project.</I></P><P>The Helloworld.cpp file is where you add the C++ source code. All C++ source codefiles have a .cpp extension. Later, I will cover other file types.</P><P>You create all the tutorial examples in this section in a similar way. The onlydifference is that the names of the workspaces and the files are different.</P><P><H3><A NAME="Heading2"></A>Helloworld.cpp</H3><P>The Helloworld program displays HELLO WORLD on the screen. Listing A.1 containsthe code. Type the code exactly as shown in the Helloworld.cpp window. Do not typethe line numbers; they are for reference only. C++ is case sensitive, so main isnot the same as MAIN, which is not the same as Main.</P><P><H4>LISTING A.1. Helloworld.cpp.</H4><PRE> 1: // Workspace Name:   Hello 2: // Program Name:  Helloworld.cpp 3:  4: # include &lt;iostream.h&gt; 5:  6: int main() 7:  8: { 9: cout&lt;&lt; &quot;HELLO WORLD \n&quot;;10: return 0;11: }</PRE><P>To run the program, follow these steps:</P><DL>	<DT></DT>	<DD><B>1. </B>Select File | Save to save your work.	<P>	<DT></DT>	<DD><B>2. </B>Select Build | Set Active Configuration<I> </I>(see Figure A.3).	<P>	<DT></DT>	<DD><B>3. </B>Highlight Hello - Win32 Debug and click OK (see Figure A.4).	<P>	<DT></DT>	<DD><B>4. </B>Select Build | Build Hello.exe.	<P></DL><P>Visual C++ compiles and links the program to create an executable file. The configurationwindow indicates the success or failure of the compilation. A successful compilationreturns</P><P><PRE>Hello.exe - 0 error(s), 0 warning(s)</PRE><P>If you encounter any errors, verify that all the lines of the program were typedexactly as shown.</P><P>To execute the Helloworld program, select Build | Execute Hello.exe.</P><P><A HREF="javascript:popUp('0afig03.gif')"><B>FIGURE A.3.</B></A><B> </B><I>Settingthe active configuration.</I></P><P><A HREF="javascript:popUp('0afig04.gif')"><B>FIGURE A.4.</B></A><B> </B><I>SelectingWin32 Debug.</I></P><P>The program executes by opening an MS-DOS shell and displaying the text HELLOWORLD (see Figure A.5).</P><P><A HREF="javascript:popUp('0afig05.gif')"><B>FIGURE A.5.</B></A><B> </B><I>HELLOWORLD display.</I></P><P><H4>Components of Helloworld.cpp</H4><P>The first two lines of the program are comment lines:</P><P><PRE>// Workspace Name:   Hello// Program Name:  Helloworld.cpp</PRE><P>The double slash command (//) tells the compiler to ignore everything after theslash. It is good programming practice to comment your work because it makes theprogram easier to read, especially for someone who did not write it. Comments becomeimportant when you are working on a complex program for months. When you want tomake changes, comments assist you in recollecting your thoughts from more than amonth ago.</P><P>The third line begins with the pound symbol (#):</P><P><PRE># include &lt;iostream.h&gt;</PRE><P>This is a directive to the preprocessor to search for the filename that follows(iostream.h) and include it. The angled brackets (&lt; &gt;) cause the preprocessorto search for the file in the default directories. The iostream.h file contains definitionsfor the insertion (&lt;&lt;) and extraction (&gt;&gt;) operators. This directiveis required to process the cout statement defined on line 9 in the program. The iostream.hfile is a precompiled header provided with your compiler. You may experiment withthe Helloworld program by commenting out the include line. To do this, insert thebackslash (//) before the pound sign (#). When you compile and execute this program,you get an error:</P><P><PRE>Compiling...Helloworld.cppC:\cplusplus\Hello\Helloworld.cpp(9) : error C2065: &Acirc; `cout' : undeclared identifierC:\cplusplus\Hello\Helloworld.cpp(9) : error C2297: `&lt;&lt;' : bad right &Acirc;operandError executing cl.exe.Hello.exe - 2 error(s), 0 warning(s)</PRE><P>Without the iostream.h file, the program does not recognize the cout command orthe insertion operator (&lt;&lt;).</P><P>The next line of code, line 6, is actually where program execution begins. Thisis the entry point of your code:</P><P><PRE>int main()</PRE><P>This line tells the compiler to process a function named main. Every C++ programis a collection of functions. You will cover functions in greater detail later inthis appendix. For now, you define a function as the entry point for a block of codewith a given name. The empty parentheses indicate that the function does not passany parameters. Passing parameters by functions is described in the section &quot;Functionsand Variables,&quot; later in this chapter.</P><P>Every C++ program must have the function main()<I>.</I> It is the entry pointto begin program execution. If a function returns a value, its name must be precededby the type of value it will return; in this case, main() returns a value of typeint.</P><P>The block of code defined by any function should be enclosed in curly brackets({ }):</P><P><PRE>{cout&lt;&lt; &quot;HELLO WORLD \n&quot;;return 0;}</PRE><P>All code within these brackets belongs to the named function--in this case, main().</P><P>The next line executes the cout object. It is followed by the redirection operator&lt;&lt;, which passes the information to be displayed. The text to be displayedis enclosed in quotes. This is followed by the newline operator (\n). The redirectionor insertion operator (&lt;&lt;) tells the code that whatever follows is to be insertedto cout.</P><BLOCKQUOTE>	<P><HR><STRONG>NOTE:</STRONG> Line 9 ends with a semicolon. All statements in C++ must end	with a semicolon. <HR></BLOCKQUOTE><P>Line 10 of the code has a return statement. Programmers often use return statementseither to return certain values or to return errors. Also remember that on line 7when you defined the main() function, you defined its return type to be an integer(int). You may rerun this code by deleting the return statement on line 10, in whichcase line 7 would have to be modified as follows:</P><P><PRE>void main()</PRE><P>It is good programming practice to include return codes for complex programs.They will help you identify and track down bugs in your program.</P><P><B>Functions and Variables</B></P><P>The Helloworld program consists of only one function, main(). A functional C++program typically consists of more than a single function. To use a function, youmust first declare it. A function declaration is also called its prototype. A prototypeis a concise representation of the entire function. When you prototype a function,you are actually writing a statement, and as mentioned before, all statements inC++ should end with semicolons. A function prototype consists of a return type, name,and parameter list. The return type in the main() function is int, the name is main,and the parameter list is (), null.</P><P>A function must have a prototype and a definition. The prototype and the definitionof a function must agree in terms of return type, name, and parameter list. The onlydifference is that the prototype is a statement and must end with a semicolon. ListingA.2 illustrates this point with a simple program to calculate the area of a triangle.</P><P><H4>LISTING A.2. Area.cpp.</H4><PRE> 1: // Workspace:  Triangle</PRE><PRE> 2: // Program name:  Area.cpp</PRE><PRE> 3: // The area of a triangle is half its base times height 4: // Area of triangle = (Base length of triangle * Height of triangle)/2 5:  6: #include &lt;iostream.h&gt;       // Precompiled header 7:  8: double  base,height,area;    // Declaring the variables 9: double Area(double,double);   // Function Prototype/declaration10: 11: int  main()12: {13: cout &lt;&lt; &quot;Enter Height of Triangle: &quot;;  // Enter a number14: cin &gt;&gt; height;              // Store the input in variable15: cout &lt;&lt; &quot;Enter Base of Triangle: &quot;;   // Enter a number16: cin &gt;&gt; base;               // Store the input in variable17: 18: area = Area(base,height);        // Store the result from the Area 		&Acirc;function19:                                  // in the variable area20: cout &lt;&lt; &quot;The Area of the Triangle is: &quot;&lt;&lt; area &lt;&lt; endl ; // Output the 	&Acirc;area21: 22: return 0;23: }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人午夜免费av| 国产精品99久久久久久似苏梦涵| 欧美精品一区二区在线观看| 欧美日韩久久一区| 欧美少妇性性性| 在线看不卡av| 欧美日韩中文精品| 欧美乱妇15p| 欧美一区二区三区在线观看 | 亚洲二区在线视频| 一区二区在线免费观看| 一区二区三区不卡视频| 亚洲精品国产精品乱码不99 | 91精品国产一区二区| 欧美日韩国产电影| 日韩无一区二区| 久久亚洲私人国产精品va媚药| 欧美精品一区二区三区在线| 国产网站一区二区三区| 国产精品久久久久久久久免费樱桃 | 一片黄亚洲嫩模| 亚洲成av人片一区二区| 视频一区视频二区中文| 国产精品一二三在| 一本色道亚洲精品aⅴ| 欧美男人的天堂一二区| 精品久久久久一区二区国产| 国产精品网曝门| 一区二区三区精品在线观看| 日韩**一区毛片| 成人精品免费网站| 8x福利精品第一导航| 国产日韩欧美激情| 亚洲综合色网站| 国产大陆亚洲精品国产| 一本大道av伊人久久综合| 在线播放日韩导航| 国产校园另类小说区| 亚洲欧美区自拍先锋| 精品无人码麻豆乱码1区2区| 91视视频在线观看入口直接观看www| 欧美人与禽zozo性伦| 国产欧美一区二区精品性| 亚洲第一福利一区| 粉嫩13p一区二区三区| 欧美日韩亚洲不卡| 中文字幕亚洲区| 久久成人久久鬼色| 欧美性猛片aaaaaaa做受| 亚洲午夜激情网页| 国产中文字幕一区| 欧美精品vⅰdeose4hd| 国产精品成人网| 国产永久精品大片wwwapp | 亚洲乱码一区二区三区在线观看| 另类的小说在线视频另类成人小视频在线| 成人免费视频一区| 日韩三级视频中文字幕| 亚洲精品免费在线观看| 成人做爰69片免费看网站| 欧美巨大另类极品videosbest | 精品国产一区二区三区久久影院 | 国产老妇另类xxxxx| 欧美精品一级二级三级| 亚洲裸体在线观看| 成人免费福利片| 国产人久久人人人人爽| 青青草成人在线观看| 欧美日韩不卡在线| 亚洲大片免费看| 在线免费一区三区| 亚洲男帅同性gay1069| 99久久免费国产| 中文字幕不卡的av| 成人高清免费观看| 国产精品久久久久久久久搜平片 | 国产人久久人人人人爽| 国产高清精品久久久久| 日韩免费一区二区| 久久国产婷婷国产香蕉| 日韩欧美一区在线| 久久精品国产秦先生| 欧美va在线播放| 狠狠色丁香九九婷婷综合五月| 欧美一区二区三级| 国产一区在线精品| 国产清纯美女被跳蛋高潮一区二区久久w| 久久99久久99精品免视看婷婷| 久久人人97超碰com| 成人免费高清在线| 亚洲麻豆国产自偷在线| 国产欧美日韩亚州综合| 成人午夜免费视频| 一区二区三区资源| 欧美日韩aaaaaa| 加勒比av一区二区| 国产精品视频你懂的| 91香蕉视频污| 日本不卡一区二区三区| 精品国产乱码久久久久久久久| 国产美女精品在线| 国产精品成人在线观看| 欧美丰满少妇xxxxx高潮对白 | 国产馆精品极品| 18欧美亚洲精品| 欧美视频一区二区在线观看| 久久99国产精品久久99| 日本一区二区三区在线观看| 日本丶国产丶欧美色综合| 五月激情六月综合| 久久精品网站免费观看| 欧美在线999| 国产精品99精品久久免费| 亚洲欧美电影一区二区| 精品国产乱码久久久久久免费| av亚洲精华国产精华精华| 亚洲午夜免费福利视频| 国产午夜精品一区二区三区视频 | 不卡一区二区中文字幕| 亚洲成人免费av| 国产视频不卡一区| 欧美日本在线看| 成人18视频在线播放| 亚洲成人免费视频| 国产精品网站在线| 亚洲视频免费在线| 久久这里只有精品6| 欧美日韩综合色| 99在线热播精品免费| 老色鬼精品视频在线观看播放| 国产精品高潮久久久久无| 日韩美女天天操| 欧美精品久久天天躁| 99国产欧美另类久久久精品| 韩国v欧美v日本v亚洲v| 五月开心婷婷久久| 亚洲天堂2016| 国产精品美日韩| 国产亚洲欧美激情| 欧美大片免费久久精品三p| 欧美日韩电影在线播放| 色视频一区二区| 99精品久久免费看蜜臀剧情介绍| 九一久久久久久| 久久99在线观看| 青青草国产精品97视觉盛宴| 午夜精品免费在线| 一区二区三区高清在线| 中文字幕一区二区在线播放| 国产日韩欧美不卡| 国产亚洲一区二区三区四区| 午夜精品久久久久久不卡8050| 国产精品色婷婷久久58| 欧美经典一区二区三区| 久久综合色播五月| 久久奇米777| 久久品道一品道久久精品| xnxx国产精品| 欧美激情在线一区二区| 国产日韩欧美在线一区| 国产精品三级电影| 中文字幕第一页久久| 亚洲天堂av老司机| 夜夜嗨av一区二区三区网页| 亚洲激情欧美激情| 午夜视频在线观看一区| 日本成人中文字幕在线视频| 老司机免费视频一区二区| 国产一区二区三区在线看麻豆| 国产成人免费在线视频| 97成人超碰视| 欧美日韩在线三级| 日韩欧美亚洲国产另类| 久久久久国产精品厨房| 国产精品日产欧美久久久久| 亚洲激情男女视频| 日韩电影一二三区| 在线一区二区三区做爰视频网站| 91美女片黄在线观看| 91 com成人网| 国产婷婷色一区二区三区四区 | 亚洲一本大道在线| 美女被吸乳得到大胸91| 国产不卡在线播放| 在线免费观看不卡av| 日韩视频免费直播| 国产精品高潮久久久久无| 香蕉影视欧美成人| 成人精品一区二区三区四区 | 国产伦精品一区二区三区在线观看 | 久99久精品视频免费观看| www.欧美色图| 欧美一个色资源| 亚洲欧美另类久久久精品| 视频一区二区欧美| 97精品国产97久久久久久久久久久久| 欧美疯狂做受xxxx富婆| 国产精品视频看| 九色porny丨国产精品| 在线观看欧美日本|