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

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

?? apa.htm

?? /// //Visual C++ 6.0 21天自學教程
?? 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| 91美女福利视频| 国产欧美日韩精品a在线观看| 首页国产丝袜综合| 一本色道久久加勒比精品 | 国产伦理精品不卡| 欧美日韩精品一区二区三区| 一区在线播放视频| 国产激情91久久精品导航| 日韩天堂在线观看| 亚洲第一主播视频| 在线观看日韩精品| 亚洲欧美怡红院| 成人中文字幕合集| 国产欧美日韩另类一区| 国产一区二区主播在线| 欧美大片拔萝卜| 日韩国产高清影视| 欧美美女网站色| 亚洲综合在线第一页| 色综合一个色综合亚洲| 国产精品成人免费在线| 国产69精品久久久久777| 久久嫩草精品久久久久| 老司机精品视频在线| 91麻豆精品国产自产在线| 亚洲综合网站在线观看| 在线观看成人小视频| 亚洲欧美日韩国产手机在线| 暴力调教一区二区三区| 国产精品视频一二| av不卡免费在线观看| 日韩一区在线免费观看| 99久久99久久精品国产片果冻| 国产精品国产a级| 99久久综合精品| 综合中文字幕亚洲| 91福利国产精品| 亚洲成人福利片| 欧美精品一级二级| 日韩精品一级二级| 日韩欧美久久一区| 精品在线播放免费| 久久精品无码一区二区三区| 国产成人av电影在线| 中文字幕乱码日本亚洲一区二区| 国产99精品在线观看| 中文字幕在线免费不卡| 色综合久久精品| 亚洲一区二区三区四区在线观看 | 国产精品久久久久永久免费观看| 成人污视频在线观看| 亚洲欧美一区二区久久| 欧美性做爰猛烈叫床潮| 午夜国产不卡在线观看视频| 日韩亚洲欧美成人一区| 激情av综合网| 国产精品久久久久一区二区三区共| 91小视频免费观看| 午夜av一区二区| 欧美xxxxx牲另类人与| 国产成人8x视频一区二区| 成人欧美一区二区三区视频网页 | 国产老妇另类xxxxx| 中文av一区特黄| 91蜜桃免费观看视频| 亚洲成人在线网站| 精品久久99ma| 成人午夜精品一区二区三区| 一区二区三区在线免费视频| 欧美精品日韩一本| 国产精品66部| 亚洲综合偷拍欧美一区色| 欧美一区二区在线免费观看| 国产精品一区在线| 一区二区高清视频在线观看| 91精品国产乱码久久蜜臀| 国产高清精品在线| 一级女性全黄久久生活片免费| 欧美一级艳片视频免费观看| 成人免费毛片a| 亚洲动漫第一页| 久久精品人人爽人人爽| 欧美性视频一区二区三区| 韩国女主播一区| 亚洲美腿欧美偷拍| 亚洲精品一线二线三线| 成人sese在线| 视频一区二区三区中文字幕| 中文字幕不卡在线播放| 欧美裸体bbwbbwbbw| 成人丝袜高跟foot| 石原莉奈在线亚洲三区| 国产精品久久久久久久久晋中| 欧美日韩三级视频| 成人sese在线| 久久国产视频网| 一区二区三区中文字幕电影| 久久久久久久久久久电影| 欧美在线高清视频| 国产不卡免费视频| 蜜桃精品在线观看| 亚洲综合图片区| 国产日韩在线不卡| 91精品一区二区三区久久久久久| 99久久精品国产网站| 久久精品99国产国产精| 怡红院av一区二区三区| 国产亚洲一区字幕| 欧美一区二视频| 欧美亚洲动漫精品| a级精品国产片在线观看| 极品销魂美女一区二区三区| 亚洲一区二区在线观看视频| 中文字幕免费不卡在线| 欧美电影免费观看高清完整版在线 | eeuss影院一区二区三区| 久久成人免费网站| 天天综合色天天综合色h| 亚洲女同ⅹxx女同tv| 国产精品午夜春色av| 精品久久久久久久久久久久包黑料 | 制服丝袜中文字幕亚洲| 在线视频国内自拍亚洲视频| 成人精品免费视频| 国产呦精品一区二区三区网站| 日韩av一区二区三区四区| 亚洲精品高清在线| 亚洲桃色在线一区| 亚洲国产精品99久久久久久久久| 精品欧美一区二区在线观看| 91精品国产综合久久婷婷香蕉| 欧美性受xxxx| 欧美性欧美巨大黑白大战| 91在线看国产| 99视频一区二区三区| 国产成人av影院| 国产一区二区三区av电影| 蜜臀av性久久久久蜜臀av麻豆| 天堂成人免费av电影一区| 一个色综合av| 一区二区三区日韩在线观看| 亚洲图片你懂的| 17c精品麻豆一区二区免费| 国产精品久久久久久久久久久免费看 | 日韩免费成人网| 91精品国产欧美一区二区18| 7777精品伊人久久久大香线蕉的 | 欧美精品第一页| 欧美群妇大交群中文字幕| 欧美日韩二区三区| 欧美老年两性高潮| 欧美日韩成人在线一区| 欧美三级乱人伦电影| 欧美三级电影在线观看| 欧美午夜在线观看| 4438x成人网最大色成网站| 在线成人av网站| 日韩一级大片在线观看| 欧美videos大乳护士334| 精品免费视频.| 久久久久久久av麻豆果冻| 国产三级久久久| 中文字幕一区二区三区四区不卡 | 国产日韩三级在线| 国产精品另类一区| 中文字幕一区二区三区四区 | 国产色产综合产在线视频| 中文字幕av一区二区三区| √…a在线天堂一区| 尤物在线观看一区| 日韩成人一级片| 国产一区二区不卡| 成人激情av网| 欧美中文字幕一区二区三区亚洲| 欧美精品久久久久久久多人混战| 欧美一卡二卡三卡四卡| 国产色婷婷亚洲99精品小说| 亚洲欧美韩国综合色| 天天av天天翘天天综合网色鬼国产| 蜜桃av噜噜一区二区三区小说| 国产sm精品调教视频网站| 色一区在线观看| 欧美一级一区二区| 中文幕一区二区三区久久蜜桃| 亚洲精品亚洲人成人网| 日本v片在线高清不卡在线观看| 国产一区二区三区香蕉| 色综合婷婷久久| 日韩一卡二卡三卡| 中文字幕一区二区三区在线观看| 午夜伦欧美伦电影理论片| 国产一区二区三区国产| 色婷婷久久久综合中文字幕| 欧美一级日韩一级| 国产精品国产三级国产aⅴ入口 | 精品一区二区在线看| zzijzzij亚洲日本少妇熟睡|