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

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

?? ape.htm

?? 21天學會VC的英文版
?? HTM
?? 第 1 頁 / 共 4 頁
字號:
21:          for(i=0;i&lt;arNumbers.GetSize()-1;i++)22:          {23:              if (arNumbers[i] &gt; arNumbers[i+1])24:              {25:                  Swap(&amp;arNumbers,i);26:                  bSorted = FALSE;27:              }28:          }29:      } while(!bSorted);30:31:      TRACE(&quot;After Sort\n&quot;);32:      for(i=0;i&lt;arNumbers.GetSize();i++)33:          TRACE(&quot;[%d] = %d\n&quot;,i+1,arNumbers[i]);34:  }</PRE><P>Listing E.1 sorts an array of random numbers (between 1 and 100), generated inline 11. Lines 13 to 15 then print out the contents of the array before sorting byTRACE statements. Lines 17 through 29 sort the array by swapping pairs of numbersthat are in the wrong order (by calling the Swap() function in line 25). The Swap()function (lines 1 to 6) takes a pointer to the array and a position and then swapsthe two numbers at that position.</P><P>After sorting, the contents of the array are again printed in the output windowby the TRACE statements in lines 31 to 33.</P><P>The trace output of this program appears in the Output window of Developer Studio,as shown in Table E.3.</P><P><H4>TABLE E.3.&nbsp;OUTPUT FROM THE SORTING PROGRAM.</H4><P><TABLE BORDER="1">	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">			<H4>BEFORE SORT		</TD>		<TD ALIGN="LEFT">			<H4>AFTER SORT		</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">[1] = 42		</TD>		<TD ALIGN="LEFT">[1] = 1		</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">[2] = 68		</TD>		<TD ALIGN="LEFT">[2] = 25		</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">[3] = 35		</TD>		<TD ALIGN="LEFT">[3] = 35		</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">[4] = 1		</TD>		<TD ALIGN="LEFT">[4] = 42		</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">[5] = 70		</TD>		<TD ALIGN="LEFT">[5] = 59		</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">[6] = 25		</TD>		<TD ALIGN="LEFT">[6] = 63		</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">[7] = 79		</TD>		<TD ALIGN="LEFT">[7] = 65		</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">[8] = 59		</TD>		<TD ALIGN="LEFT">[8] = 68		</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">[9] = 63		</TD>		<TD ALIGN="LEFT">[9] = 70		</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">[10] = 65		</TD>		<TD ALIGN="LEFT">[10] = 79		</TD>	</TR></TABLE><H3><A NAME="Heading10"></A>Using the ASSERT and VERIFY macros</H3><P>You can use the ASSERT macro to ensure that conditions are TRUE. ASSERT is passedone parameter that is either a TRUE or FALSE expression. If the expression is TRUE,all is well. If the expression is FALSE, your program will stop and the Debug AssertionFailed dialog box will be displayed (see Figure E.7), prompting you to Abort theprogram, Retry the code, or Ignore the assertion. It also shows the program, sourcefile, and line number where the assertion failed. If you choose Abort, the debuggingsession is terminated. Retry is probably the most useful option because the compilerwill then show you the code where the ASSERT macro has failed, enabling you to figureout what went wrong. If you already know or don't care about the assertion, you canchoose Ignore and continue running the program, which might then result in a morefatal error.</P><P><A HREF="javascript:popUp('30fig07.gif')"><B>FIGURE E.7.</B></A><B> </B><I>TheDebug Assertion Failed dialog box helps you track down bugs.</I></P><P>A common use of ASSERT is to ensure that input parameters to functions are correct.For example, you can make the Sort() function (shown in Listing E.1) more robustby checking its input parameters. To check the input parameters, add ASSERT macrosat the top of the Sort() function like this:</P><P><PRE>ASSERT(pdwNumbers);ASSERT(i&gt;=0 &amp;&amp; i&lt;10);</PRE><P>This will ensure that the pointer to the numbers array isn't zero and that theposition to swap is between 0 and 9. If either of these is incorrect, the Debug AssertionFailed dialog box is displayed. This technique helps you track down errors causedby passing faulty parameters to functions. It is a good practice to use the ASSERTmacro to check that the values passed to each of your functions conform to your expectations.</P><P>Another macro, ASSERT_VALID, can be used with CObject-derived classes such asmost MFC classes. This performs a more thorough check on the object and its contentsto ensure the entire object is in a correct and valid state. You can pass a pointerto the object to be checked like this:</P><P><PRE>ASSERT_VALID(pdwNumbers);</PRE><P>Another ASSERT macro is ASSERT_KINDOF, which is used on CObject-derived classesto check that they are of the correct class type. For example, you can check thata pointer to your view object is of the correct view class like this:</P><P><PRE>ASSERT_KINDOF(CYourSpecialView,pYView);</PRE><P>The Assertion Failed dialog box will be displayed if it isn't of the correct classtype or any of its derivatives.</P><P>You must be careful not to put any code that is needed for normal program operationinto ASSERT macros because they are excluded in the release build. A common sourceof release mode errors that are hard to track down is coding like this:</P><P><PRE>int a = 0;ASSERT(++a &gt; 0);if (a&gt;0) MyFunc();</PRE><P>In the debug build, this code will increment the integer a in the ASSERT lineand then call MyFunc() in the following line because a is greater than zero. Whenyour sales team is eager to demonstrate your new application, you might think itworks fine because there aren't any Debug mode problems. So you recompile it in Releasemode and hand it over to your sales department, which demonstrates it to a customer,whereupon it crashes badly. It crashes because the ++a isn't performed--the releasemode excludes ASSERT lines.</P><P>The VERIFY macro helps with this problem. VERIFY works like ASSERT, and in Debugmode it throws the same Assertion Failed dialog box if the expression is zero. However,in release mode the expression is still evaluated, but a zero result won't displaythe Assertion dialog box. You will tend to use VERIFY when you always want to performan expression and ASSERT when you only want to check while debugging. Therefore,replacing ASSERT in the previous example with VERIFY, as shown in the following example,will enable the release build to work properly:</P><P><PRE>VERIFY(++a &gt; 0);</PRE><P>You are more likely to use VERIFY to check return codes from functions:</P><P><PRE>VERIFY(MyFunc() != FALSE);</PRE><H3><A NAME="Heading11"></A>Using Breakpoints and Single Stepping the Program</H3><P>The use of single stepping and breakpoints is probably the most effective debuggingtool for tracking down the majority of problems. The support for various types ofbreakpoints and the single-stepping information available is very sophisticated inVisual C++; I can only hope to give you a taste of the power of this debugging tool.</P><P>The key to single stepping is breakpoints. You can set a breakpoint anywhere inyour code and then run your program through the debugger. When the breakpoint isreached, the code will be displayed in the editor window at the breakpoint position,ready for you to single step or continue running.</P><P>You can add a breakpoint by selecting the specific code line (clicking the editorcursor onto the line in the editor window) and then either clicking the Breakpointicon in the Build minibar (see Figure E.8) or by pressing F9. Alternatively, mostsophisticated breakpoints can be added or removed by clicking the Edit menu and selectingthe Breakpoints option to display the Breakpoints dialog box (see Figure E.9). Whenyou add a breakpoint, it's displayed as a small red circle next to the line you havespecified. Breakpoints can be set only against valid code lines, so sometimes theDeveloper Studio will move one of your breakpoints to the closest valid code linefor you.</P><P><A HREF="javascript:popUp('30fig08r.gif')"><B>FIGURE E.8.</B></A><B> </B><I>Addinga breakpoint to your code via the Build minibar toolbar or the F9 key.</I></P><P><A HREF="javascript:popUp('30fig09.gif')"><B>FIGURE E.9.</B></A><B> </B><I>Addinga breakpoint using the Breakpoints dialog box.</I></P><P>You can toggle the breakpoint on or off by clicking the Breakpoint (hand shaped)icon or remove it by clicking the Remove or Remove All buttons on the Breakpointsdialog box. You can leave them in position but disable them by clicking the checkmark to the left of each breakpoint listed in the Breakpoints dialog box. Clickingthere again will show the check and re-enable the breakpoint.</P><P>When you have set your breakpoint(s), you can run the code through the debuggerby choosing Build, Start Debug, Go. Alternatively, you can use the shortcut by clickingthe Go icon (to the left of the Breakpoint icon on the Build minibar toolbar--referto Figure E.8) or by pressing the F5 key.</P><P>The program will run as normal until it reaches the breakpoint, where it willstop and display an arrow against the line with the breakpoint. At that point, youcan use the Debug toolbar to control the single stepping process, as shown in FigureE.10.</P><P><A HREF="javascript:popUp('30fig10r.gif')"><B>FIGURE E.10.</B></A><B> </B><I>Thedebugger stopped at a breakpoint ready for single stepping with the Debug toolbar.</I></P><P>When stopped in the debugger, you can see the contents of most variables merelyby moving the cursor over them in the editor window. Their contents are then displayedin a ToolTip at the cursor position. More detailed contents are shown by draggingthe variables into the Watch window, as discussed in detail in the next section.</P><P>You can single step through the code using the four curly brace icons shown onthe Debug toolbar or by clicking the Debug menu and choosing one of the step options.The available step options are shown in Table E.4. You can find these on the Debugmenu and the Debug toolbar.</P><P><H4>TABLE E.4. STEP OPTIONS AVAILABLE IN SINGLE STEPPING.</H4><P><TABLE BORDER="1">	<TR ALIGN="LEFT" VALIGN="TOP">		<TD WIDTH="134" ALIGN="LEFT"><I>Icon/Step Option</I></TD>		<TD ALIGN="LEFT"><I>Shortcut Key</I></TD>		<TD ALIGN="LEFT"><I>Effect When Selected</I></TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD WIDTH="134" ALIGN="LEFT"><IMG SRC="ic-12.gif" WIDTH="29" HEIGHT="28" ALIGN="BOTTOM" BORDER="0"> Step Into		</TD>		<TD ALIGN="LEFT">F11		</TD>		<TD ALIGN="LEFT">The debugger will execute the current line and if the cursor is over a function call,			it will enter that function.		</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD WIDTH="134" ALIGN="LEFT"><IMG SRC="ic-13.gif" WIDTH="29" HEIGHT="28" ALIGN="BOTTOM" BORDER="0"> Step Over		</TD>		<TD ALIGN="LEFT">F10		</TD>		<TD ALIGN="LEFT">Like Step Into except when over a function call line, it will run that function at			normal speed and then stop when it returns from the function, giving the effect of			stepping over it.		</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD WIDTH="134" ALIGN="LEFT"><IMG SRC="ic-14.gif" WIDTH="29" HEIGHT="28" ALIGN="BOTTOM" BORDER="0"> Step Out		</TD>		<TD ALIGN="LEFT">Shift+F11		</TD>		<TD ALIGN="LEFT">The debugger will run the rest of the current function at normal speed and stop when			it returns from the function to the calling function.		</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD WIDTH="134" ALIGN="LEFT"><IMG SRC="ic-15.gif" WIDTH="29" HEIGHT="28" ALIGN="BOTTOM" BORDER="0"> Run to Cursor		</TD>		<TD ALIGN="LEFT">Ctrl+F10		</TD>		<TD ALIGN="LEFT">The debugger will run until it reaches your specified cursor position. You can set			this position by clicking the line you want to run to.		</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD WIDTH="134" ALIGN="LEFT"><IMG SRC="ic-05.gif" WIDTH="29" HEIGHT="28" ALIGN="BOTTOM" BORDER="0"> Go		</TD>		<TD ALIGN="LEFT">F5		</TD>		<TD ALIGN="LEFT">Continue running the program at normal speed until the next breakpoint is encountered.		</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD WIDTH="134" ALIGN="LEFT"><IMG SRC="ic-08.gif" WIDTH="24" HEIGHT="27" ALIGN="BOTTOM" BORDER="0"> Stop Debugging		</TD>		<TD ALIGN="LEFT">Shift+F5		</TD>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品不卡一区| 99久久精品国产一区| 亚洲一线二线三线久久久| 欧美韩日一区二区三区| 日本一区二区高清| 久久精品一二三| 国产精品二区一区二区aⅴ污介绍| 久久久精品一品道一区| 国产日韩欧美综合在线| 国产精品你懂的在线欣赏| 国产精品家庭影院| 一区二区三区高清| 天天免费综合色| 精品一区二区三区av| 激情久久五月天| 成人av资源在线| 欧美亚洲综合在线| 日韩精品一区二| 亚洲天堂中文字幕| 免费看黄色91| gogo大胆日本视频一区| 欧美色涩在线第一页| 91精品国产综合久久精品性色 | www.日韩精品| 色综合天天综合给合国产| 在线成人av影院| 国产日本欧洲亚洲| 亚洲与欧洲av电影| 极品少妇xxxx精品少妇偷拍| kk眼镜猥琐国模调教系列一区二区| 日本电影亚洲天堂一区| 欧美一级艳片视频免费观看| 国产精品网站在线观看| 五月天激情综合| 国产精品系列在线观看| 9191国产精品| 亚洲欧洲三级电影| 秋霞影院一区二区| 色婷婷久久99综合精品jk白丝| 91麻豆精品国产91久久久 | 亚洲欧美日韩一区二区三区在线观看| 国产精品不卡一区二区三区| 视频一区二区三区在线| 成人免费高清视频| 538在线一区二区精品国产| 国产精品久久久久久久浪潮网站 | 国产精品日韩成人| 日本午夜精品视频在线观看| 色综合久久综合网| 久久网站最新地址| 丝袜国产日韩另类美女| 91蝌蚪porny| 国产精品丝袜黑色高跟| 老司机精品视频在线| 欧美群妇大交群中文字幕| 中文字幕在线播放不卡一区| 国产一区免费电影| 日韩美女一区二区三区四区| 亚洲国产一二三| 99re8在线精品视频免费播放| 国产亚洲女人久久久久毛片| 蜜桃视频第一区免费观看| 欧美日韩久久一区二区| 亚洲最新在线观看| 色综合色狠狠综合色| 亚洲欧洲综合另类| 99久久婷婷国产综合精品电影| 国产色爱av资源综合区| 黄色日韩三级电影| 欧美精品一区二区三区久久久| 日韩av在线播放中文字幕| 在线观看日韩电影| 亚洲一线二线三线视频| 在线观看三级视频欧美| 亚洲福利视频一区| 69久久夜色精品国产69蝌蚪网| 午夜精品在线视频一区| 欧美一区二区久久久| 老司机精品视频一区二区三区| 欧美一级欧美三级| 久久国产精品露脸对白| 国产亚洲精品免费| 成人av在线网| 亚洲欧美一区二区不卡| 欧美日韩精品一区二区三区| 首页欧美精品中文字幕| 日韩欧美国产精品| 国产传媒日韩欧美成人| 国产精品传媒入口麻豆| 日本韩国欧美三级| 丝袜a∨在线一区二区三区不卡| 欧美岛国在线观看| 成人综合婷婷国产精品久久蜜臀 | 三级欧美韩日大片在线看| 欧美日韩免费电影| 精品一区二区在线观看| 欧美国产综合色视频| 91美女视频网站| 婷婷夜色潮精品综合在线| 精品久久久久久久久久久久包黑料| 国产精品影视在线| 综合久久久久综合| 91精品国产综合久久久蜜臀粉嫩 | 日av在线不卡| 欧美国产1区2区| 在线观看av不卡| 久草中文综合在线| 自拍偷拍国产亚洲| 精品少妇一区二区三区| 成人精品视频一区二区三区尤物| 亚洲二区在线视频| 久久久久久久久久久电影| 欧美在线看片a免费观看| 激情成人综合网| 亚洲va天堂va国产va久| 久久久久久亚洲综合| 欧美日韩国产综合久久| 国产成人一级电影| 日韩高清不卡一区二区三区| 国产精品污网站| 精品国产精品网麻豆系列| 色偷偷成人一区二区三区91| 国产成人免费视频网站| 日日嗨av一区二区三区四区| 国产精品久久久久久久久免费樱桃| 欧美一区二区三区色| 欧美在线视频日韩| 不卡电影免费在线播放一区| 久久99精品国产麻豆不卡| 亚洲成av人影院| 亚洲一区二区在线播放相泽| 日本一区二区三区在线不卡| 日韩精品一区二区三区四区| 欧美精品日韩精品| 91首页免费视频| 成人免费视频免费观看| 国产一区二区美女诱惑| 久久精品噜噜噜成人av农村| 性做久久久久久| 一区二区激情视频| 亚洲精品成人精品456| 日韩一区在线看| 中文字幕视频一区二区三区久| 国产香蕉久久精品综合网| 精品国产乱码久久久久久图片| 欧美日产在线观看| 欧美在线免费观看亚洲| 欧美在线观看视频一区二区| 在线一区二区三区四区五区 | 日韩一区二区在线观看视频播放| 色美美综合视频| 一本一道久久a久久精品综合蜜臀| 成人久久18免费网站麻豆| fc2成人免费人成在线观看播放| 成人午夜av影视| av亚洲精华国产精华精| 97久久精品人人做人人爽| 99精品视频一区二区三区| 色综合久久中文字幕综合网| 91尤物视频在线观看| 欧美视频第二页| 欧美一区二区女人| 久久精品日产第一区二区三区高清版 | 一区二区三区在线观看视频 | 蜜臀久久久久久久| 琪琪久久久久日韩精品| 麻豆免费精品视频| 国产黄人亚洲片| 成人爱爱电影网址| 欧美在线不卡视频| 日韩一级免费一区| 久久久影院官网| 亚洲色大成网站www久久九九| 亚洲一区日韩精品中文字幕| 图片区日韩欧美亚洲| 韩国女主播一区| eeuss国产一区二区三区| 欧美性受xxxx| 久久综合视频网| 亚洲色图一区二区三区| 国产伦精品一区二区三区视频青涩| 国产九九视频一区二区三区| 99久免费精品视频在线观看| 欧美日韩一卡二卡三卡| 日韩欧美的一区| 国产精品初高中害羞小美女文| 偷偷要91色婷婷| 成a人片亚洲日本久久| 欧美视频在线观看一区二区| 精品国产青草久久久久福利| 亚洲欧美日韩国产一区二区三区| 天天影视色香欲综合网老头| 成人美女视频在线看| 91精品国产免费久久综合| 亚洲国产精品精华液2区45| 日韩精品一级中文字幕精品视频免费观看 | 国产日韩精品久久久| 亚洲国产日韩在线一区模特| 国产精品1区2区3区在线观看| 91福利视频久久久久|