﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-Tauruser</title><link>http://www.cppblog.com/Tauruser/</link><description>Enjoy Every Day</description><language>zh-cn</language><lastBuildDate>Thu, 23 Apr 2026 02:18:12 GMT</lastBuildDate><pubDate>Thu, 23 Apr 2026 02:18:12 GMT</pubDate><ttl>60</ttl><item><title>CListCtrl For Beginners(转载)</title><link>http://www.cppblog.com/Tauruser/archive/2007/03/07/19381.html</link><dc:creator>Tauruser</dc:creator><author>Tauruser</author><pubDate>Wed, 07 Mar 2007 13:23:00 GMT</pubDate><guid>http://www.cppblog.com/Tauruser/archive/2007/03/07/19381.html</guid><wfw:comment>http://www.cppblog.com/Tauruser/comments/19381.html</wfw:comment><comments>http://www.cppblog.com/Tauruser/archive/2007/03/07/19381.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/Tauruser/comments/commentRss/19381.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/Tauruser/services/trackbacks/19381.html</trackback:ping><description><![CDATA[
		<p>The List Control (MFC <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmfc98/html/_mfc_CListCtrl.asp">CListCtrl</a> class) is the type of control that the Windows Explorer uses for it's right-side pane, but figuring out how to use the control can be a different kind of pain. The control is usually used only in "report view", which provides columns for each item. The following shows the basics of adding data to a List Control:<br /></p>
		<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
				<img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />
				<span style="COLOR: #000000">    </span>
				<span style="COLOR: #0000ff">int</span>
				<span style="COLOR: #000000"> Index;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" /></span>
				<span style="COLOR: #008000">//</span>
				<span style="COLOR: #008000"> Insert columns</span>
				<span style="COLOR: #008000">
						<br />
						<img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #000000">ListCtrl.InsertColumn(</span>
				<span style="COLOR: #000000">0</span>
				<span style="COLOR: #000000">, </span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">One</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">, LVCFMT_LEFT, </span>
				<span style="COLOR: #000000">-</span>
				<span style="COLOR: #000000">1</span>
				<span style="COLOR: #000000">, </span>
				<span style="COLOR: #000000">0</span>
				<span style="COLOR: #000000">);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />ListCtrl.InsertColumn(</span>
				<span style="COLOR: #000000">1</span>
				<span style="COLOR: #000000">, </span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">Two</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">, LVCFMT_LEFT, </span>
				<span style="COLOR: #000000">-</span>
				<span style="COLOR: #000000">1</span>
				<span style="COLOR: #000000">, </span>
				<span style="COLOR: #000000">1</span>
				<span style="COLOR: #000000">);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" /></span>
				<span style="COLOR: #008000">//</span>
				<span style="COLOR: #008000"> Insert first row</span>
				<span style="COLOR: #008000">
						<br />
						<img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #000000">Index </span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> ListCtrl.InsertItem(LVIF_TEXT, </span>
				<span style="COLOR: #000000">0</span>
				<span style="COLOR: #000000">, </span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">One one</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">, </span>
				<span style="COLOR: #000000">0</span>
				<span style="COLOR: #000000">, </span>
				<span style="COLOR: #000000">0</span>
				<span style="COLOR: #000000">, </span>
				<span style="COLOR: #000000">0</span>
				<span style="COLOR: #000000">, NULL);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />ListCtrl.SetItem(Index, </span>
				<span style="COLOR: #000000">1</span>
				<span style="COLOR: #000000">, LVIF_TEXT, </span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">One two</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">, </span>
				<span style="COLOR: #000000">0</span>
				<span style="COLOR: #000000">, </span>
				<span style="COLOR: #000000">0</span>
				<span style="COLOR: #000000">, </span>
				<span style="COLOR: #000000">0</span>
				<span style="COLOR: #000000">, NULL);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" /></span>
				<span style="COLOR: #008000">//</span>
				<span style="COLOR: #008000"> Insert second row</span>
				<span style="COLOR: #008000">
						<br />
						<img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #000000">Index </span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000"> ListCtrl.InsertItem(LVIF_TEXT, </span>
				<span style="COLOR: #000000">1</span>
				<span style="COLOR: #000000">, </span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">Two one</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">, </span>
				<span style="COLOR: #000000">0</span>
				<span style="COLOR: #000000">, </span>
				<span style="COLOR: #000000">0</span>
				<span style="COLOR: #000000">, </span>
				<span style="COLOR: #000000">0</span>
				<span style="COLOR: #000000">, NULL);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />ListCtrl.SetItem(Index, </span>
				<span style="COLOR: #000000">1</span>
				<span style="COLOR: #000000">, LVIF_TEXT, </span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">Two two</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">, </span>
				<span style="COLOR: #000000">0</span>
				<span style="COLOR: #000000">, </span>
				<span style="COLOR: #000000">0</span>
				<span style="COLOR: #000000">, </span>
				<span style="COLOR: #000000">0</span>
				<span style="COLOR: #000000">, NULL);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" /></span>
				<span style="COLOR: #008000">//</span>
				<span style="COLOR: #008000"> Set column widths (an optional nice touch)</span>
				<span style="COLOR: #008000">
						<br />
						<img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #000000">ListCtrl.SetColumnWidth(</span>
				<span style="COLOR: #000000">0</span>
				<span style="COLOR: #000000">, LVSCW_AUTOSIZE);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />ListCtrl.SetColumnWidth(</span>
				<span style="COLOR: #000000">1</span>
				<span style="COLOR: #000000">, LVSCW_AUTOSIZE);</span>
		</div>
		<br />If you are using CListView, then you will need to use something such as the following to access the <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmfc98/html/_mfc_CListCtrl.asp">CListCtrl</a>:<br /><br /><div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" /><span style="COLOR: #000000">CListCtrl </span><span style="COLOR: #000000">&amp;</span><span style="COLOR: #000000">ListCtrl </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"> GetListCtrl();</span></div><p>Note that for these to work, the control must have the "LVS_REPORT" style. For list controls in dialogs, including dialogs for <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmfc98/html/_mfc_CFormView.asp">CFormView</a>, this style can be set in the dialog editor. If you are using <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmfc98/html/_mfc_CListView.asp">CListView</a> or you are creating list controls using Create, the style can be set in a PreCreateWindow override, as in:<br /><br /></p><div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><img id="Codehighlighter1_50_115_Open_Image" onclick="this.style.display='none'; Codehighlighter1_50_115_Open_Text.style.display='none'; Codehighlighter1_50_115_Closed_Image.style.display='inline'; Codehighlighter1_50_115_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_50_115_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_50_115_Closed_Text.style.display='none'; Codehighlighter1_50_115_Open_Image.style.display='inline'; Codehighlighter1_50_115_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /><span style="COLOR: #000000">BOOL CDumpView::PreCreateWindow(CREATESTRUCT</span><span style="COLOR: #000000">&amp;</span><span style="COLOR: #000000"> cs) </span><span id="Codehighlighter1_50_115_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.cppblog.com/images/dot.gif" /></span><span id="Codehighlighter1_50_115_Open_Text"><span style="COLOR: #000000">{<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />cs.style </span><span style="COLOR: #000000">|=</span><span style="COLOR: #000000"> LVS_REPORT;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000"> CListView::PreCreateWindow(cs);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span></div><p align="left"><br /></p><p align="left"><font size="2"><strong><font size="5">Getting a Count of Columns<br /></font><br /></strong></font></p><font size="3">The solution for determining the number of columns is not obvious. You must get the header control from the list control and get the number of items (rows) in the header control. So I suggest putting the following in your header:</font><p></p><div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><img id="Codehighlighter1_35_71_Open_Image" onclick="this.style.display='none'; Codehighlighter1_35_71_Open_Text.style.display='none'; Codehighlighter1_35_71_Closed_Image.style.display='inline'; Codehighlighter1_35_71_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_35_71_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_35_71_Closed_Text.style.display='none'; Codehighlighter1_35_71_Open_Image.style.display='inline'; Codehighlighter1_35_71_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /><span style="COLOR: #000000">CHeaderCtrl </span><span style="COLOR: #000000">*</span><span style="COLOR: #000000">GetHeaderCtrl() </span><span style="COLOR: #0000ff">const</span><span style="COLOR: #000000"> </span><span id="Codehighlighter1_35_71_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.cppblog.com/images/dot.gif" /></span><span id="Codehighlighter1_35_71_Open_Text"><span style="COLOR: #000000">{</span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000"> (CHeaderCtrl</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000">)GetDlgItem(</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">);}</span></span><span style="COLOR: #000000">;<br /><img id="Codehighlighter1_102_142_Open_Image" onclick="this.style.display='none'; Codehighlighter1_102_142_Open_Text.style.display='none'; Codehighlighter1_102_142_Closed_Image.style.display='inline'; Codehighlighter1_102_142_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_102_142_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_102_142_Closed_Text.style.display='none'; Codehighlighter1_102_142_Open_Image.style.display='inline'; Codehighlighter1_102_142_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> GetColumnsCount() </span><span style="COLOR: #0000ff">const</span><span style="COLOR: #000000"> </span><span id="Codehighlighter1_102_142_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.cppblog.com/images/dot.gif" /></span><span id="Codehighlighter1_102_142_Open_Text"><span style="COLOR: #000000">{</span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000"> GetHeaderCtrl()</span><span style="COLOR: #000000">-&gt;</span><span style="COLOR: #000000">GetItemCount();}</span></span><span style="COLOR: #000000">;</span></div><strong><font size="5"><p align="left"><br />Deleting All Columns</p></font></strong><p>Using GetColumnsCount() from above, it is easy to delete all columns.<br /></p><div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><img id="Codehighlighter1_38_112_Open_Image" onclick="this.style.display='none'; Codehighlighter1_38_112_Open_Text.style.display='none'; Codehighlighter1_38_112_Closed_Image.style.display='inline'; Codehighlighter1_38_112_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_38_112_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_38_112_Closed_Text.style.display='none'; Codehighlighter1_38_112_Open_Image.style.display='inline'; Codehighlighter1_38_112_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000"> CListControl::DeleteAllColumns() </span><span id="Codehighlighter1_38_112_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img src="http://www.cppblog.com/images/dot.gif" /></span><span id="Codehighlighter1_38_112_Open_Text"><span style="COLOR: #000000">{<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> i, n;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />n </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"> GetColumnsCount();<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="COLOR: #0000ff">for</span><span style="COLOR: #000000"> (i</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">; i</span><span style="COLOR: #000000">&lt;</span><span style="COLOR: #000000">n; </span><span style="COLOR: #000000">++</span><span style="COLOR: #000000">i)<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    DeleteColumn(</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span></div><h2 style="MARGIN-TOP: 40px">Confusing Terminology</h2><p><br /></p><p>Microsoft has made things very confusing because the Platform SDK name for a listbox is "ListBox Control" but MFC programmers usually use "list control" to refer to an instance of the <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmfc98/html/_mfc_CListCtrl.asp">CListCtrl</a> class, which is confusing. Also, the MFC class name for a "List View Control" is <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmfc98/html/_mfc_CListCtrl.asp">CListCtrl</a> and <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmfc98/html/_mfc_CListView.asp">CListView</a> is the view class for it. The MFC class name for a "ListBox Control" is <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmfc98/html/_mfc_CListBox.asp">CListBox</a> so we would expect the view class for it to also be CListView except there is not a view class. The following summarizes this. 
</p><p style="MARGIN-LEFT: 40px; TEXT-INDENT: -20px"><b>Platform SDK name:</b><a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/listboxes/listboxes.asp">List Boxes</a><br /><b>Window class name:</b> ListBox (See under "Predefined Controls" in <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/CommCtls/Common/user.asp">User Controls</a> and the documentation for <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowreference/windowfunctions/CreateWindow.asp">CreateWindow</a> and <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowreference/windowfunctions/CreateWindowEx.asp">CreateWindowEx</a>)<br /><b>MFC class name:</b><a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmfc98/html/_mfc_CListBox.asp">CListBox</a><br /><b>MFC view class name:</b> none</p><p style="MARGIN-LEFT: 40px; TEXT-INDENT: -20px"><b>Platform SDK name:</b><a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/CommCtls/ListView/ListView.asp">ListView Control </a><br /><b>Window class name:</b> SysListView32 (use WC_LISTVIEW in source code instead, which is defined as "SysListView32")<br /><b>MFC class name:</b><a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmfc98/html/_mfc_CListCtrl.asp">CListCtrl</a><br /><b>MFC view class name:</b><a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmfc98/html/_mfc_CListView.asp">CListView</a></p><p><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></p><img src ="http://www.cppblog.com/Tauruser/aggbug/19381.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/Tauruser/" target="_blank">Tauruser</a> 2007-03-07 21:23 <a href="http://www.cppblog.com/Tauruser/archive/2007/03/07/19381.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>结构体对齐的具体含义（#pragma pack） (转载)</title><link>http://www.cppblog.com/Tauruser/archive/2007/02/28/19049.html</link><dc:creator>Tauruser</dc:creator><author>Tauruser</author><pubDate>Wed, 28 Feb 2007 06:40:00 GMT</pubDate><guid>http://www.cppblog.com/Tauruser/archive/2007/02/28/19049.html</guid><wfw:comment>http://www.cppblog.com/Tauruser/comments/19049.html</wfw:comment><comments>http://www.cppblog.com/Tauruser/archive/2007/02/28/19049.html#Feedback</comments><slash:comments>6</slash:comments><wfw:commentRss>http://www.cppblog.com/Tauruser/comments/commentRss/19049.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/Tauruser/services/trackbacks/19049.html</trackback:ping><description><![CDATA[
		<div class="postbody">
				<h1>
						<p>结构体对齐的具体含义（#pragma pack）</p>
				</h1>
				<p>作者：<a href="http://blog.vckbase.com/panic"><a title="Panic" href="http://blog.vckbase.com/panic/">panic</a></a>2005年4月2日</p>
				<p>还是来自csdn的帖子：<br />主　　题：   探讨：内存对齐<br />作　　者：   typedef_chen ((名未定)(我要骗人))<br />等　　级：   <br />信 誉 值：   100<br />所属论坛：   C/C++ C++ 语言<br />问题点数：   50<br />回复次数：   1<br />发表时间：   2005-04-02 22:53:27<br />  <br />  <br />朋友帖了如下一段代码：<br />　　#pragma pack(4)<br />　　class TestB<br />　　{<br />　　public:<br />　　　　int aa;<br />　　　　char a;<br />　　　　short b;<br />　　　　char c;<br />　　};<br />　　int nSize = sizeof(TestB);<br />　　这里nSize结果为12，在预料之中。</p>
				<p>　　现在去掉第一个成员变量为如下代码：<br />　　#pragma pack(4)<br />　　class TestC<br />　　{<br />　　public:<br />　　　　char a;<br />　　　　short b;<br />　　　　char c;<br />　　};<br />　　int nSize = sizeof(TestC);<br />　　按照正常的填充方式nSize的结果应该是8，为什么结果显示nSize为6呢？</p>
				<p>事实上，很多人对#pragma pack的理解是错误的。<br />#pragma pack规定的对齐长度，实际使用的规则是：<br />结构，联合，或者类的数据成员，第一个放在偏移为0的地方，以后每个数据成员的对齐，按照#pragma pack指定的数值和这个数据成员自身长度中，比较小的那个进行。<br />也就是说，当#pragma pack的值等于或超过所有数据成员长度的时候，这个值的大小将不产生任何效果。<br />而结构整体的对齐，则按照结构体中最大的数据成员 和 #pragma pack指定值 之间，较小的那个进行。<br /><br />具体解释<br />#pragma pack(4)<br />　　class TestB<br />　　{<br />　　public:<br />　　　　int aa; //第一个成员，放在[0,3]偏移的位置，<br />　　　　char a; //第二个成员，自身长为1，#pragma pack(4),取小值，也就是1，所以这个成员按一字节对齐，放在偏移[4]的位置。<br />　　　　short b; //第三个成员，自身长2，#pragma pack(4)，取2，按2字节对齐，所以放在偏移[6,7]的位置。<br />　　　　char c; //第四个，自身长为1，放在[8]的位置。<br />　　};<br />这个类实际占据的内存空间是9字节<br />类之间的对齐，是按照类内部最大的成员的长度，和#pragma pack规定的值之中较小的一个对齐的。<br />所以这个例子中，类之间对齐的长度是min(sizeof(int),4)，也就是4。<br />9按照4字节圆整的结果是12，所以sizeof(TestB)是12。</p>
				<p>
						<br />如果<br />#pragma pack(2)<br />    class TestB<br />　　{<br />　　public:<br />　　　　int aa; //第一个成员，放在[0,3]偏移的位置，<br />　　　　char a; //第二个成员，自身长为1，#pragma pack(4),取小值，也就是1，所以这个成员按一字节对齐，放在偏移[4]的位置。<br />　　　　short b; //第三个成员，自身长2，#pragma pack(4)，取2，按2字节对齐，所以放在偏移[6,7]的位置。<br />　　　　char c; //第四个，自身长为1，放在[8]的位置。<br />　　};<br />//可以看出，上面的位置完全没有变化，只是类之间改为按2字节对齐，9按2圆整的结果是10。<br />//所以 sizeof(TestB)是10。</p>
				<p>最后看原贴：<br />现在去掉第一个成员变量为如下代码：<br />　　#pragma pack(4)<br />　　class TestC<br />　　{<br />　　public:<br />　　　　char a;//第一个成员，放在[0]偏移的位置，<br />　　　　short b;//第二个成员，自身长2，#pragma pack(4)，取2，按2字节对齐，所以放在偏移[2,3]的位置。<br />　　　　char c;//第三个，自身长为1，放在[4]的位置。<br />　　};<br />//整个类的大小是5字节，按照min(sizeof(short),4)字节对齐，也就是2字节对齐，结果是6<br />//所以sizeof(TestC)是6。<br /><br />感谢<!--StartFragment --><a id="Comments1_CommentList__ctl8_NameLink" href="http://blog.vckbase.com/Michael/" target="_blank">Michael</a> 提出疑问，在此补充：<br /><br /><strong>当数据定义中出现__declspec( align() )时，指定类型的对齐长度还要用自身长度和这里指定的数值比较，然后取其中较大的。最终类/结构的对齐长度也需要和这个数值比较，然后取其中较大的。</strong><br /><br />可以这样理解，<!--StartFragment --> __declspec( align() ) 和 #pragma pack是一对兄弟，前者规定了对齐的最小值，后者规定了对齐的最大值，两者同时出现时，前者拥有更高的优先级。<br />__declspec( align() )的一个特点是，它仅仅规定了数据对齐的位置，而没有规定数据实际占用的内存长度，当指定的数据被放置在确定的位置之后，其后的数据填充仍然是按照#pragma pack规定的方式填充的，这时候类/结构的实际大小和内存格局的规则是这样的：<br />在__declspec( align() )之前，数据按照#pragma pack规定的方式填充，如前所述。当遇到__declspec( align() )的时候，首先寻找距离当前偏移向后最近的对齐点（满足对齐长度为max(数据自身长度,指定值) )，然后把被指定的数据类型从这个点开始填充，其后的数据类型从它的后面开始，仍然按照#pragma pack填充，直到遇到下一个__declspec( align() )。<br />当所有数据填充完毕，把结构的整体对齐数值和__declspec( align() )规定的值做比较，取其中较大的作为整个结构的对齐长度。<br />特别的，当__declspec( align() )指定的数值比对应类型长度小的时候，这个指定不起作用。</p>
		</div>
<img src ="http://www.cppblog.com/Tauruser/aggbug/19049.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/Tauruser/" target="_blank">Tauruser</a> 2007-02-28 14:40 <a href="http://www.cppblog.com/Tauruser/archive/2007/02/28/19049.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>MFC ComboBox 使用方法（转载）</title><link>http://www.cppblog.com/Tauruser/archive/2007/02/28/19038.html</link><dc:creator>Tauruser</dc:creator><author>Tauruser</author><pubDate>Wed, 28 Feb 2007 02:29:00 GMT</pubDate><guid>http://www.cppblog.com/Tauruser/archive/2007/02/28/19038.html</guid><wfw:comment>http://www.cppblog.com/Tauruser/comments/19038.html</wfw:comment><comments>http://www.cppblog.com/Tauruser/archive/2007/02/28/19038.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cppblog.com/Tauruser/comments/commentRss/19038.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/Tauruser/services/trackbacks/19038.html</trackback:ping><description><![CDATA[
		<h1 align="center">MFC ComboBox 使用方法（转载）<br /></h1>
		<br />Combo box controls are space savers. Wherever there is no need for a multi-select from a list of items, combo box is a good choice in such places. This article " CComboBox Example" explains how to use the MFC CComboBox class for manipulation of a list of strings. 
<h2 sid92="0" sdqik="0">CComboBox Example - Initializing a Combo Box:</h2><p sid92="0" sdqik="0">   It is assumed that the readers of the sample have already created a <a class="kLink" oncontextmenu="return false;" id="KonaLink0" onmouseover="adlinkMouseOver(event,this,0);" style="POSITION: static; TEXT-DECORATION: underline! important" onclick="adlinkMouseClick(event,this,0);" onmouseout="adlinkMouseOut(event,this,0);" href="http://www.codersource.net/mfc_ccombobox_example.html#" target="_top"><font style="FONT-WEIGHT: 400; COLOR: blue! important; FONT-FAMILY: Arial, Helvetica, sans-serif; POSITION: static" color="blue" size="2"><span class="kLink" style="FONT-WEIGHT: 400; COLOR: blue! important; FONT-FAMILY: Arial, Helvetica, sans-serif; POSITION: relative">dialog </span><span class="kLink" style="FONT-WEIGHT: 400; COLOR: blue! important; FONT-FAMILY: Arial, Helvetica, sans-serif; POSITION: relative">box</span></font></a> (either in a dialog based application or SDI/MDI application) and placed a combo box control from the controls toolbox on the Resource Editor. </p><p sid92="6" sdqik="0">   After placing the combo box control on the dialog box, open the class wizard by pressing <i sid92="0" sdqik="0">Ctrl + W </i>keys or <i sid92="0" sdqik="0">Menu --&gt; View --&gt; ClassWizard</i>. In the <i sid92="0" sdqik="0">Member Variables</i> tab, Add a Variable for the CComboBox class. This CComboBox example assumes that the variable name is, </p><p sid92="0" sdqik="0">      CComboBox  m_cbExample; </p><p sid92="0" sdqik="0">   This m_cbExample will be used further in our CComboBox example MFC code. </p><p><!-- Ad Link Place Holder here --></p><div align="center"><p><adlinks></adlinks></p></div><p></p><h2 sid92="0" sdqik="0">CComboBox Example - Adding Items to a Combo Box:</h2><p sid92="2" sdqik="0">   The function AddString is used for adding items to a combo box. If there is a constant set of data, these values can also be added in the Resource Editor itself. The Combo Box control properties dialog has a tab for adding <i sid92="0" sdqik="0">data</i>. Otherwise the data can be added as follows. </p><p sid92="4" sdqik="0">    m_cbExample.AddString("StringData1");<br />    m_cbExample.AddString("StringData2");<br />    m_cbExample.AddString("StringData3"); </p><h2 sid92="0" sdqik="0">CComboBox Example - Retrieving Items from a Combo Box:</h2><p sid92="2" sdqik="0">   Usually <endl;><br />a requirement for retrieving items from the combo box will arise from selecting the data. This article also assumes the same. Now the data selected in a combo box needs to be retrieved. 
<p sid92="2" sdqik="0">   To do this, the first step is to find out the index of the selected item inside the combo box control.<endl;><br />Then the item at the corresponding position needs to be pulled out as follows. 
<p sid92="8" sdqik="0"><endl;><br />    int nIndex = m_cbExample.GetCurSel();<br />    CString strCBText;<br /><endl;><br />    m_cbExample.GetLBText(<endl;><br />nIndex, strCBText); 
<p sid92="1" sdqik="0"><endl;><br />   In the above CComboBox example code, the value will be retrieved and stored in strCBText variable. There is another overloaded version for GetLBText. But the version which uses CString is the easiest one. 
<p><endl;><br /><h3 sid92="0" sdqik="0">CComboBox Example - Finding Items inside a Combo Box:</h3><p sid92="1" sdqik="0"><endl;><br />   This kind of Find operations on a Combo box will most probably be useful in programs that dynamically modify the values in a combo box. The function FindStringExact is used to find the exact string match inside a combo box. 
<p sid92="1" sdqik="0"><endl;><br />    int nIndex = m_cbExample.FindStringExact(0, "Value to be found");<endl;><br /><p sid92="0" sdqik="0">   The string position inside the combo box control is the return value. It returns CB_ERR if it was unsuccessful in finding the string. </p><p><endl;><br /><h3 sid92="0" sdqik="0">CComboBox Example - Deleting Items from a Combo Box:</h3><p sid92="1" sdqik="0"><endl;><br />    This operation can be done by using the CCombobox member function DeleteString. This function needs the index of the item inside the combo box. 
<p sid92="3" sdqik="0"><endl;><br />     m_cbExample<endl;><br />.DeleteString(nIndex);</endl;></endl;></p></endl;></p><p></p></endl;></p><p></p></endl;></endl;></p><p></p></endl;></p><p></p></endl;></p><p></p></endl;></p><p></p></endl;></endl;></endl;></p><p></p></endl;></p><p></p></endl;></p><p></p><img src ="http://www.cppblog.com/Tauruser/aggbug/19038.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/Tauruser/" target="_blank">Tauruser</a> 2007-02-28 10:29 <a href="http://www.cppblog.com/Tauruser/archive/2007/02/28/19038.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>０５年写的直线裁剪算法</title><link>http://www.cppblog.com/Tauruser/archive/2007/01/28/18105.html</link><dc:creator>Tauruser</dc:creator><author>Tauruser</author><pubDate>Sun, 28 Jan 2007 02:28:00 GMT</pubDate><guid>http://www.cppblog.com/Tauruser/archive/2007/01/28/18105.html</guid><wfw:comment>http://www.cppblog.com/Tauruser/comments/18105.html</wfw:comment><comments>http://www.cppblog.com/Tauruser/archive/2007/01/28/18105.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.cppblog.com/Tauruser/comments/commentRss/18105.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/Tauruser/services/trackbacks/18105.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: ０５年上CAD课写的一个直线裁剪程序中的裁剪算法部份，希望对学习图形学要写裁剪算法的同学有参考作用。&nbsp;&nbsp;<a href='http://www.cppblog.com/Tauruser/archive/2007/01/28/18105.html'>阅读全文</a><img src ="http://www.cppblog.com/Tauruser/aggbug/18105.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/Tauruser/" target="_blank">Tauruser</a> 2007-01-28 10:28 <a href="http://www.cppblog.com/Tauruser/archive/2007/01/28/18105.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>C# Coding时的注释格式(zz)</title><link>http://www.cppblog.com/Tauruser/archive/2006/10/25/14128.html</link><dc:creator>Tauruser</dc:creator><author>Tauruser</author><pubDate>Wed, 25 Oct 2006 07:05:00 GMT</pubDate><guid>http://www.cppblog.com/Tauruser/archive/2006/10/25/14128.html</guid><wfw:comment>http://www.cppblog.com/Tauruser/comments/14128.html</wfw:comment><comments>http://www.cppblog.com/Tauruser/archive/2006/10/25/14128.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/Tauruser/comments/commentRss/14128.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/Tauruser/services/trackbacks/14128.html</trackback:ping><description><![CDATA[
		<p>C# Coding的时候，常常涉及代码注释，常见的注释包括两类：</p>
		<p>1）单行注释。格式：// Comments</p>
		<p>2）多行注释。格式：/* Comments... */</p>
		<p>C#引入了新的XML注释，即我们在某个函数前新起一行，输入///，VS.Net会自动增加XML格式的注释，这里整理一下可用的XML注释。</p>
		<p>XML注释分为一级注释（Primary Tags）和二级注释（Secondary Tags），前者可以单独存在，后者必须包含在一级注释内部。</p>
		<p>I 一级注释</p>
		<p>1. &lt;remarks&gt;对类型进行描述，功能类似&lt;summary&gt;，据说建议使用&lt;remarks&gt;;</p>
		<p>2. &lt;summary&gt;对共有类型的类、方法、属性或字段进行注释；</p>
		<p>3. &lt;value&gt;主要用于属性的注释，表示属性的制的含义，可以配合&lt;summary&gt;使用；</p>
		<p>4. &lt;param&gt;用于对方法的参数进行说明，格式：&lt;param name="param_name"&gt;value&lt;/param&gt;；</p>
		<p>5. &lt;returns&gt;用于定义方法的返回值，对于一个方法，输入///后，会自动添加&lt;summary&gt;、&lt;param&gt;列表和&lt;returns&gt;；</p>
		<p>6. &lt;exception&gt;定义可能抛出的异常，格式：&lt;exception cref="IDNotFoundException"&gt;；</p>
		<p>7. &lt;example&gt;用于给出如何使用某个方法、属性或者字段的使用方法；</p>
		<p>8. &lt;permission&gt;涉及方法的访问许可；</p>
		<p>9. &lt;seealso&gt;用于参考某个其它的东东:)，也可以通过cref设置属性；</p>
		<p>10. &lt;include&gt;用于指示外部的XML注释；</p>
		<p>II 二级注释</p>
		<p>1. &lt;c&gt; or &lt;code&gt;主要用于加入代码段；</p>
		<p>2. &lt;para&gt;的作用类似HTML中的&lt;p&gt;标记符，就是分段；</p>
		<p>3. &lt;pararef&gt;用于引用某个参数；</p>
		<p>4. &lt;see&gt;的作用类似&lt;seealso&gt;，可以指示其它的方法；</p>
		<p>5. &lt;list&gt;用于生成一个列表；</p>
		<p>另外，还可以自定义XML标签。</p>
		<p>呵呵，通过在工程的属性中设置 XML Documentation File的文件名，即可生成xml格式的文件。</p>
		<p>另外还有一个有用的工具叫NDoc，可以根据这些注释生成帮助文件，很好使。但是好像不支持Vs.net 2005。</p>
<img src ="http://www.cppblog.com/Tauruser/aggbug/14128.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/Tauruser/" target="_blank">Tauruser</a> 2006-10-25 15:05 <a href="http://www.cppblog.com/Tauruser/archive/2006/10/25/14128.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>查找字符串的哈希方法(zz)</title><link>http://www.cppblog.com/Tauruser/archive/2006/06/21/8781.html</link><dc:creator>Tauruser</dc:creator><author>Tauruser</author><pubDate>Wed, 21 Jun 2006 07:39:00 GMT</pubDate><guid>http://www.cppblog.com/Tauruser/archive/2006/06/21/8781.html</guid><wfw:comment>http://www.cppblog.com/Tauruser/comments/8781.html</wfw:comment><comments>http://www.cppblog.com/Tauruser/archive/2006/06/21/8781.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.cppblog.com/Tauruser/comments/commentRss/8781.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/Tauruser/services/trackbacks/8781.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: //				 RS Hash Function																								unsigned 				int				 RSHash(				char				 				*				str)																								{        unsigned 						int						 b ...&nbsp;&nbsp;<a href='http://www.cppblog.com/Tauruser/archive/2006/06/21/8781.html'>阅读全文</a><img src ="http://www.cppblog.com/Tauruser/aggbug/8781.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/Tauruser/" target="_blank">Tauruser</a> 2006-06-21 15:39 <a href="http://www.cppblog.com/Tauruser/archive/2006/06/21/8781.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>木马客户端与服务端通讯如何隐藏不被发现</title><link>http://www.cppblog.com/Tauruser/archive/2006/06/17/8657.html</link><dc:creator>Tauruser</dc:creator><author>Tauruser</author><pubDate>Sat, 17 Jun 2006 02:34:00 GMT</pubDate><guid>http://www.cppblog.com/Tauruser/archive/2006/06/17/8657.html</guid><wfw:comment>http://www.cppblog.com/Tauruser/comments/8657.html</wfw:comment><comments>http://www.cppblog.com/Tauruser/archive/2006/06/17/8657.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/Tauruser/comments/commentRss/8657.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/Tauruser/services/trackbacks/8657.html</trackback:ping><description><![CDATA[
		<table style="WORD-BREAK: break-all" height="36" cellspacing="0" cellpadding="0" width="778" align="center" bgcolor="#ffffff" border="0">
				<tbody>
						<tr>
								<td align="middle" bgcolor="#fff9f0">
										<p>
												<b>木马客户端与服务端通讯如何隐藏不被发现</b>
										</p>
								</td>
						</tr>
						<tr>
						</tr>
				</tbody>
		</table>
		<table style="WORD-BREAK: break-all" cellspacing="0" cellpadding="0" width="778" align="center" bgcolor="#ffffff" border="0">
				<tbody>
						<tr>
								<td>一个成功的木马必须实现一种既可靠，又不易被宿主发现的通讯方案，下面在我所知的范围内对各种方案的实现方法，可靠性，安全性做一些探讨。文中错误之处一定很多，欢迎大家指出，更希望能有木马开发经验的高手写一些这方面的文章，能让不管是黑客，还是普通用户，都得到一定的提高。至于什么警告的我也不多说了，反正看了文章你去做坏事与我是毫无关系的。下面进入正题。 
<p>　　首先应该明确的是受害者的机器上运行的木马程序我们称之为服务端，控制者机器上运行的我们称之为客户端(其实对于现代的木马，已经很难说谁是客户，谁是服务了，不过我们还是继续用这种叫法)。另外虽然Windows9x仍然有巨大的用户基础，但是Windows9x向Windows XP迁徙只是早晚问题，所以这里的讨论主要是针对NT/2000/XP平台的。</p><p>　　<strong>1.使用TCP协议，服务端侦听，客户端连接</strong></p><p>　　这是最简单，最早，最广泛使用的一种通讯方案。使用过冰河或者被冰河客户端扫过的对此一定不会陌生。这种通讯方案是服务端在宿主机器上开一个TCP端口，然后等待客户端的连接，在通过对客户端的认证后，客户端就可以控制服务端了。由于是建立在TCP协议基础上，所以通讯的可靠性是得到保证的。但是通讯的安全性却很成问题。首先，使用像fport,tcpview pro这样的工具可以很容易的发现在某一端口上侦听的进程，以及进程对应的可执行文件。其次，在安装了防火墙的机器上，当客户端连接到服务端时，很容易引起防火墙报警。</p><p>　　<strong>2.使用TCP协议，客户端侦听，服务端连接</strong></p><p>　　这就是所谓的反向连接技术了。为了克服服务端在某一端口上侦听易被发现这一缺点，现在服务端不再侦听端口，而是去连接客户端在侦听的某一端口。这样用一般的port scanner或者fport就很发现不了服务端了。而为了更好的麻痹宿主机，客户端侦听的端口一般是21,80,23这种任何人都要访问的端口。虽然在安装了防火墙的机器上，服务端去连接客户端还是要引起防火墙报警，但是一个粗心的用户很可能会忽略“应用程序xxxxx试图访问xxx.xxx.xxx.xxx通过端口80”这样的警告。</p><p>　　这种反向连接技术要解决的一个问题是，服务端如何找到客户端。由于一般客户端都是拨号上网的，没有一个固定的IP，所以客户端IP不可能硬编码在服务端程序中。当然由于拨号上网用户的IP一般都是处于一个固定的IP地址范围内，服务端也可以扫描这个范围，然后根据被扫描主机的反馈来确定是否是自己的客户端，但是服务端扫描一个IP地址范围也太……另一个方法是客户端通过一个有固定IP或者固定域名的第三方发布自己的IP，实现的方法就很多了，比如通过一个公共的邮箱，通过一个个人主页，就看你有多大的想象力的。</p><p>　　<strong>3.使用UDP协议，服务端侦听，客户端连接;客户端侦听，服务端连接</strong></p><p>　　方法和安全性与使用TCP协议差不多。需要注意的是UDP不是一个可靠的协议，所以，必须在UDP协议的基础上设计一个自己的可靠的报文传递协议。</p><p>　　<strong>4.解决防火墙问题，无论是服务端被动侦听，还是服务端主动连接，在服务端和客户端试图建立连接时都会引起防火墙得报警</strong></p><p>　　毕竟粗心得用户不会很多，所以，解决防火墙报警是服务端必须要解决的一个问题。一种方法是代码注入，服务端将自己注入到一个可以合法的与外界进行网络通讯的进程(比如 IE, ICQ, OICQ, TELNTED, FTPD, IIS等)的地址空间中，然后或者可以以一个新线程的形式运行，或者只是修改宿主进程，截获宿主进程的网络系统调用(WinSock)。后者的实现可能要麻烦一些。如果是以新线程的形式运行，那么然后或者可以被动侦听，或者可以主动连接。</p><p>　　无论哪种情况都不会引起防火墙的报警(当然不是百分之百不会引起防火墙报警)。但要注意的是如果是被动侦听的话，比如寄生在IE内，用fport会发现IE在某一个端口侦听，这有可能会引起细心的用户的警觉。所以比较好得方法是在新线程内去主动连接客户端，而且连的是客户端的80端口;如果是寄生在OICQ内，何不连接客户端的8000端口。使用代码注入需要服务端具有若干特权，考虑到一般用户都是以Admin身份启动NT的，这应该不是一个问题(如果服务端是作为一个service启动的话，就更没问题了)。</p><p><strong>5.再讨论一下服务端主动连接时客户端IP的公布问题</strong></p><p></p><p>　　使用第三方公布客户端IP不是一种可靠的方法。比如如果是通过一个个人主页发布客户端IP的话，一旦由于种种原因，这个个人主页被主页提供商取消的话，服务端就找不到客户端了。而这种个人主页被主页提供商取消的可能性是很大的。同时客户端也要冒暴露自己的IP的风险。所以更好的方法是客户端通过某种方法主动告诉服务端自己的IP和端口，然后服务端来连接。这样可以保证最大的可靠性，安全性和灵活性。</p><p>　　服务端怎么收到客户端的通知呢?一种方法是我们截获其他进程收到的TCP数据或者UDP包，然后分析截获的数据，从中确定是否客户端发来了一个报告其IP的数据片断。另一种方法是使用RAW socket来收听ECHO REPLY类型的ICMP包，在ICMP数据包的数据去就包含了客户端IP。而对于普通用户来说，由于要上网浏览，这样的ICMP包是很少过滤掉的。</p><p>　　<strong>6.用ICMP来通讯</strong></p><p>　　既然客户端可以通过发一个ICMP(ECHO REPLY)来告诉服务端它的IP，那为什么不把所有服务端和客户端的通讯都建立在ICMP的基础上呢?服务端向客户端发ICMP(ECHO REQUEST)，客户端向服务端发ICMP(ECHO REPLY)，然后可以在ICMP基础上建立一个自己的可靠数据报通讯协议。如果不怕烦的话，还可以建立一个TCP over ICMP。由于一般的用户这两类ICMP包都是设为无警告放行的，这种方法的隐秘性还是很强的。</p><p>　　<strong>7. 用自定义的协议来通讯</strong></p><p>　　我们知道IP头的协议字段指定了这个IP包承载得数据的协议，比如TCP,UDP,ICMP等等。我们完全可以把这个字段设为我们自己定义的值(??80)，定义自己的通讯协议。不过估计这种IP包将会被所有的防火墙过滤掉。</p><p>　　<strong>8.关于服务器上的木马的通讯隐藏</strong></p><p>　　前面所说都是针对个人用户(大部分都是拨号用户，包括Modem,ISDN,ADSL,FTTX+LA,Cable Modem)。对这类机器来说，一般都没有开什么服务，而且一般都使用了个人防火墙，同时ICMP ECHO REPLY/REQUEST都是放行的，所有才有我们上述的各种方案。而对于服务器来说，至少要开HTTP服务，同时，又一般位于专门的防火墙之后。这个专门的防火墙很可能过滤掉除类型为TCP，且目的端口为80的IP包之外的所有的IP包，更不要说各类ICMP包了。向下的方案通不过，我们可以试试向上的方案。一种方法就是注射到IIS服务的进程空间中，然后在IIS接受到木马客户端的请求前来个预处理，在IIS将数据发给木马客户端时来个后处理，不过我不知道怎么实现，不知哪为高手知道。</p><p>　　另一种方法就是写一个ISAPI AP，这样，木马客户端发个 http://xxx.xxx.xxx.xxx/backdoor.dll?cmd=dir+c: 请求来发命令了。当然，一切信息都是加密得。RPC除了RPC over SMB,RPC over TCP等等外，还有一个RPC over HTTP，事实上QQ的http代理就是他自己定义的一个rpc over http，至少QQ自己是这么叫的。现在，我们也来了个rpc over http。</p><p>　　通讯隐藏技术只是木马隐藏诸技术中得一部分，但也是最重要的一部分。因为他不但要保护木马，还要保护木马得控制者，所以不管是木马编写者，还是防火墙编写者，都应该对这一部分给于足够的重视。</p></td>
						</tr>
				</tbody>
		</table>
<img src ="http://www.cppblog.com/Tauruser/aggbug/8657.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/Tauruser/" target="_blank">Tauruser</a> 2006-06-17 10:34 <a href="http://www.cppblog.com/Tauruser/archive/2006/06/17/8657.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Gauss消去法直接求解方程组(附例程)</title><link>http://www.cppblog.com/Tauruser/archive/2006/06/04/8154.html</link><dc:creator>Tauruser</dc:creator><author>Tauruser</author><pubDate>Sun, 04 Jun 2006 12:22:00 GMT</pubDate><guid>http://www.cppblog.com/Tauruser/archive/2006/06/04/8154.html</guid><wfw:comment>http://www.cppblog.com/Tauruser/comments/8154.html</wfw:comment><comments>http://www.cppblog.com/Tauruser/archive/2006/06/04/8154.html#Feedback</comments><slash:comments>7</slash:comments><wfw:commentRss>http://www.cppblog.com/Tauruser/comments/commentRss/8154.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/Tauruser/services/trackbacks/8154.html</trackback:ping><description><![CDATA[
		<p>
				<span class="section">3.2 Gauss消去法</span>
				<br />
				<br />
				<span class="part">3.2.1　顺序消去法</span>
				<span class="text">
						<br />
						<br />　　Gauss消去法就是将方程组(3.1.1)通过(n-1)步消元，将(3.1.1)转化为上三角方程组<br />　　　<img height="110" src="http://mclab.sysu.edu.cn/na/text/chap3/images/68.gif" width="295" align="absMiddle" />　　　　(3.2.1)<br />再回代求此方程组的解.<br />　　下面记增广矩阵<img height="21" src="http://mclab.sysu.edu.cn/na/text/chap3/images/69.gif" width="123" align="absMiddle" />，即<br />　　　<img height="112" src="http://mclab.sysu.edu.cn/na/text/chap3/images/70.gif" width="304" align="absMiddle" /><br />　　第1步　设<img height="22" src="http://mclab.sysu.edu.cn/na/text/chap3/images/71.gif" width="48" align="absMiddle" />，计算<img height="47" src="http://mclab.sysu.edu.cn/na/text/chap3/images/72.gif" width="56" align="absMiddle" />l<img height="15" src="http://mclab.sysu.edu.cn/na/text/chap3/images/73.gif" width="71" align="absMiddle" />，记为<img height="24" src="http://mclab.sysu.edu.cn/na/text/chap3/images/74.gif" width="114" align="absMiddle" />，若用<img height="21" src="http://mclab.sysu.edu.cn/na/text/chap3/images/75.gif" width="25" align="absMiddle" />乘<img height="22" src="http://mclab.sysu.edu.cn/na/text/chap3/images/76.gif" width="69" align="absMiddle" />第一行加到第i行，可消去<img height="23" src="http://mclab.sysu.edu.cn/na/text/chap3/images/77.gif" width="104" align="absMiddle" />,用Gauss变换矩阵表示<br />　　　　<img height="20" src="http://mclab.sysu.edu.cn/na/text/chap3/images/78.gif" width="171" align="absMiddle" /><br />令　　　<img height="22" src="http://mclab.sysu.edu.cn/na/text/chap3/images/79.gif" width="296" align="absMiddle" /><br />其中<img height="25" src="http://mclab.sysu.edu.cn/na/text/chap3/images/80.gif" width="329" align="absMiddle" /><br />　　一般地，假定已完成了(k-1)步消元，即已将<img height="22" src="http://mclab.sysu.edu.cn/na/text/chap3/images/76.gif" width="69" align="absMiddle" />转化为以下形式：<br />　　　<img height="163" src="http://mclab.sysu.edu.cn/na/text/chap3/images/81.gif" width="320" align="absMiddle" /><br />　　第k步，假定<img height="25" src="http://mclab.sysu.edu.cn/na/text/chap3/images/82.gif" width="51" align="absMiddle" />，计算<br />　　　<img height="46" src="http://mclab.sysu.edu.cn/na/text/chap3/images/83_3.2.2.gif" width="199" align="absMiddle" />　　　　(3.2.2)<br />记<img height="21" src="http://mclab.sysu.edu.cn/na/text/chap3/images/83.gif" width="151" align="absMiddle" />，<img height="22" src="http://mclab.sysu.edu.cn/na/text/chap3/images/84.gif" width="177" align="absMiddle" />，则<br />　　　<img height="29" src="http://mclab.sysu.edu.cn/na/text/chap3/images/85.gif" width="197" align="absMiddle" /><br />其中<br />　　　<img height="60" src="http://mclab.sysu.edu.cn/na/text/chap3/images/86.gif" width="257" align="absMiddle" />　　(3.2.3).<br />当k=1,2，…,n-1则可得到<img height="20" src="http://mclab.sysu.edu.cn/na/text/chap3/images/87.gif" width="69" align="absMiddle" />，即方程组(3.2.1).<br /><br />　　直接回代解(3.2.1)得，<br />　　<img height="44" src="http://mclab.sysu.edu.cn/na/text/chap3/images/88.gif" width="373" align="absMiddle" />　　　(3.2.4)<br />并且有<img height="27" src="http://mclab.sysu.edu.cn/na/text/chap3/images/89.gif" width="156" align="absMiddle" />，由以上顺序消去过程可得如下定理.<br /><strong>　　定理2.1</strong>　设<img height="17" src="http://mclab.sysu.edu.cn/na/text/chap3/images/90.gif" width="55" align="absMiddle" />非奇异，则通过两行互换总可使<img height="22" src="http://mclab.sysu.edu.cn/na/text/chap3/images/91.gif" width="50" align="absMiddle" />，k=1,2，…,n-1.可将方程组(3.1.1)转化为(3.2.1)并求得方程组(3.1.1)的解为(3.2.4)，且有<img height="24" src="http://mclab.sysu.edu.cn/na/text/chap3/images/92.gif" width="101" align="absMiddle" />.<br />　　如果不做行交换，则使<img height="22" src="http://mclab.sysu.edu.cn/na/text/chap3/images/91.gif" width="50" align="absMiddle" />的条件如下.<br /><br /><b>　　定理2.2</b>　<img height="24" src="http://mclab.sysu.edu.cn/na/text/chap3/images/93.gif" width="109" align="absMiddle" />非奇异，且各阶顺序主子式<img height="78" src="http://mclab.sysu.edu.cn/na/text/chap3/images/94.gif" width="210" align="absMiddle" />， 则<img height="22" src="http://mclab.sysu.edu.cn/na/text/chap3/images/91.gif" width="50" align="absMiddle" />，k=1,2，…,n-1.<br /><b>　　证明</b>　用归纳法，当<img height="20" src="http://mclab.sysu.edu.cn/na/text/chap3/images/95.gif" width="110" align="absMiddle" />，故<img height="23" src="http://mclab.sysu.edu.cn/na/text/chap3/images/96.gif" width="81" align="absMiddle" />.现假设(k-1)成立，即<img height="17" src="http://mclab.sysu.edu.cn/na/text/chap3/images/97.gif" width="41" align="absMiddle" />，对i=1，2，…,k-1已推出<img height="22" src="http://mclab.sysu.edu.cn/na/text/chap3/images/98.gif" width="43" align="absMiddle" />，故Gauss消去法能进行(k-1)步消元，A已约化为<img height="18" src="http://mclab.sysu.edu.cn/na/text/chap3/images/99.gif" width="23" align="absMiddle" />，即<br />　　<img height="101" src="http://mclab.sysu.edu.cn/na/text/chap3/images/100.gif" width="519" align="absMiddle" />　<br /><br />　　　　　<img height="20" src="http://mclab.sysu.edu.cn/na/text/chap3/images/101.gif" width="209" align="absMiddle" /><br /><br />故<img height="22" src="http://mclab.sysu.edu.cn/na/text/chap3/images/91.gif" width="50" align="absMiddle" />对k=1,2,…,n均成立，证毕.<br />　　在整个消去法消元过程中，k从1到(n-1)共需乘除法运算次数为<br />　　　　　<img height="46" src="http://mclab.sysu.edu.cn/na/text/chap3/images/102.gif" width="255" align="absMiddle" /><br />加减法次数为<br />　　　　　<img height="45" src="http://mclab.sysu.edu.cn/na/text/chap3/images/103.gif" width="191" align="absMiddle" /><br />回代过程中由公式(3.2.4)可知乘除法次数为<img height="34" src="http://mclab.sysu.edu.cn/na/text/chap3/images/104.gif" width="48" align="absMiddle" />，加减法次数为<img height="33" src="http://mclab.sysu.edu.cn/na/text/chap3/images/105.gif" width="47" align="absMiddle" />，于是Gauss消去法的乘除法总次数为<img height="43" src="http://mclab.sysu.edu.cn/na/text/chap3/images/106.gif" width="86" align="absMiddle" />，加减法次数为<img height="42" src="http://mclab.sysu.edu.cn/na/text/chap3/images/107.gif" width="88" align="absMiddle" /><br /><strong>　　例3.4</strong>　用Gauss消去法解方程组<br />　　　　　　<img height="74" src="http://mclab.sysu.edu.cn/na/text/chap3/images/108.gif" width="128" align="absMiddle" /><br />并求detA.<br /><b>　　解</b>　消元得<br />　　　<img height="80" src="http://mclab.sysu.edu.cn/na/text/chap3/images/109.gif" width="547" align="absMiddle" /><br />再由(3.2.4)回代，得解<img height="38" src="http://mclab.sysu.edu.cn/na/text/chap3/images/110.gif" width="223" align="absMiddle" /></span>
		</p>
		<p class="part">讲解：</p>
		<p class="text">　　Gauss 消去法是将方程组AX＝b,通过消元转化为上三角方程组（3，2，1）求解，消元第一步做完后有<br />　　　　　　　　　<img height="109" src="http://mclab.sysu.edu.cn/na/text/chap3/images/646.gif" width="269" align="absMiddle" /><br />　　用矩阵表示<img height="27" src="http://mclab.sysu.edu.cn/na/text/chap3/images/647.gif" width="341" align="absMiddle" /><br />　　第K－1步完成后得到<img height="25" src="http://mclab.sysu.edu.cn/na/text/chap3/images/648.gif" width="73" align="absMiddle" /><br />　　当<img height="23" src="http://mclab.sysu.edu.cn/na/text/chap3/images/649.gif" width="44" align="absMiddle" />，可做K步，得到<img height="26" src="http://mclab.sysu.edu.cn/na/text/chap3/images/650.gif" width="319" align="absMiddle" /><br />　　得到<img height="25" src="http://mclab.sysu.edu.cn/na/text/chap3/images/651.gif" width="232" align="absMiddle" />，对应的方程组就是（3.2.1），利用公式（3.2.4）就可求得解。<br />　　定理2.2给出了进行顺序消去法的条件，即A的所有顺序生子式<img height="19" src="http://mclab.sysu.edu.cn/na/text/chap3/images/652.gif" width="100" align="absMiddle" />，而方程（3.1.1）解存在唯一的条件是<img height="17" src="http://mclab.sysu.edu.cn/na/text/chap3/images/653.gif" width="60" align="absMiddle" /><br /></p>
		<p class="text">好了，原理讲完了，贴我的例程。<br /></p>
		<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
				<img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />
				<span style="COLOR: #000000">#include </span>
				<span style="COLOR: #000000">&lt;</span>
				<span style="COLOR: #000000">iostream</span>
				<span style="COLOR: #000000">&gt;</span>
				<span style="COLOR: #000000">
						<br />
						<img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />#include </span>
				<span style="COLOR: #000000">&lt;</span>
				<span style="COLOR: #000000">vector</span>
				<span style="COLOR: #000000">&gt;</span>
				<span style="COLOR: #000000">
						<br />
						<img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />#include </span>
				<span style="COLOR: #000000">&lt;</span>
				<span style="COLOR: #000000">cmath</span>
				<span style="COLOR: #000000">&gt;</span>
				<span style="COLOR: #000000">
						<br />
						<img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #0000ff">using</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">namespace</span>
				<span style="COLOR: #000000"> std;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" /></span>
				<span style="COLOR: #0000ff">class</span>
				<span style="COLOR: #000000"> CGAUSSSOLVEEQU<br /><img id="Codehighlighter1_97_259_Open_Image" onclick="this.style.display='none'; Codehighlighter1_97_259_Open_Text.style.display='none'; Codehighlighter1_97_259_Closed_Image.style.display='inline'; Codehighlighter1_97_259_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_97_259_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_97_259_Closed_Text.style.display='none'; Codehighlighter1_97_259_Open_Image.style.display='inline'; Codehighlighter1_97_259_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span>
				<span id="Codehighlighter1_97_259_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
						<img src="http://www.cppblog.com/images/dot.gif" />
				</span>
				<span id="Codehighlighter1_97_259_Open_Text">
						<span style="COLOR: #000000">{<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" /></span>
						<span style="COLOR: #0000ff">private</span>
						<span style="COLOR: #000000">:<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    vector</span>
						<span style="COLOR: #000000">&lt;</span>
						<span style="COLOR: #000000">vector</span>
						<span style="COLOR: #000000">&lt;</span>
						<span style="COLOR: #0000ff">double</span>
						<span style="COLOR: #000000">&gt;&gt;</span>
						<span style="COLOR: #000000"> m_equset;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    vector</span>
						<span style="COLOR: #000000">&lt;</span>
						<span style="COLOR: #0000ff">double</span>
						<span style="COLOR: #000000">&gt;</span>
						<span style="COLOR: #000000"> m_answer;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    unsigned </span>
						<span style="COLOR: #0000ff">int</span>
						<span style="COLOR: #000000"> m_n;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" /></span>
						<span style="COLOR: #0000ff">public</span>
						<span style="COLOR: #000000">:<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
						<span style="COLOR: #0000ff">void</span>
						<span style="COLOR: #000000"> inputEquSet();<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
						<span style="COLOR: #0000ff">void</span>
						<span style="COLOR: #000000"> solveEquSet();<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
						<span style="COLOR: #0000ff">void</span>
						<span style="COLOR: #000000"> outputAnswer();<br /><img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span>
				</span>
				<span style="COLOR: #000000">;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" /></span>
				<span style="COLOR: #0000ff">void</span>
				<span style="COLOR: #000000"> CGAUSSSOLVEEQU::inputEquSet()<br /><img id="Codehighlighter1_297_664_Open_Image" onclick="this.style.display='none'; Codehighlighter1_297_664_Open_Text.style.display='none'; Codehighlighter1_297_664_Closed_Image.style.display='inline'; Codehighlighter1_297_664_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_297_664_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_297_664_Closed_Text.style.display='none'; Codehighlighter1_297_664_Open_Image.style.display='inline'; Codehighlighter1_297_664_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span>
				<span id="Codehighlighter1_297_664_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
						<img src="http://www.cppblog.com/images/dot.gif" />
				</span>
				<span id="Codehighlighter1_297_664_Open_Text">
						<span style="COLOR: #000000">{<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
						<span style="COLOR: #0000ff">double</span>
						<span style="COLOR: #000000"> dtemp;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    vector</span>
						<span style="COLOR: #000000">&lt;</span>
						<span style="COLOR: #0000ff">double</span>
						<span style="COLOR: #000000">&gt;</span>
						<span style="COLOR: #000000"> vtemp;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    cout</span>
						<span style="COLOR: #000000">&lt;&lt;</span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000">请输入你的方程个数：</span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000">;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    cin</span>
						<span style="COLOR: #000000">&gt;&gt;</span>
						<span style="COLOR: #000000">m_n;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    cout</span>
						<span style="COLOR: #000000">&lt;&lt;</span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000">请按照向量的形式输入各变量的系数。最后一位为b。每个方程一行:</span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000">&lt;&lt;</span>
						<span style="COLOR: #000000">endl;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
						<span style="COLOR: #0000ff">for</span>
						<span style="COLOR: #000000">(unsigned </span>
						<span style="COLOR: #0000ff">int</span>
						<span style="COLOR: #000000"> i(</span>
						<span style="COLOR: #000000">0</span>
						<span style="COLOR: #000000">);i</span>
						<span style="COLOR: #000000">&lt;</span>
						<span style="COLOR: #000000">m_n;</span>
						<span style="COLOR: #000000">++</span>
						<span style="COLOR: #000000">i)<br /><img id="Codehighlighter1_452_660_Open_Image" onclick="this.style.display='none'; Codehighlighter1_452_660_Open_Text.style.display='none'; Codehighlighter1_452_660_Closed_Image.style.display='inline'; Codehighlighter1_452_660_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_452_660_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_452_660_Closed_Text.style.display='none'; Codehighlighter1_452_660_Open_Image.style.display='inline'; Codehighlighter1_452_660_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span>
						<span id="Codehighlighter1_452_660_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
								<img src="http://www.cppblog.com/images/dot.gif" />
						</span>
						<span id="Codehighlighter1_452_660_Open_Text">
								<span style="COLOR: #000000">{<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        m_equset.push_back(vtemp);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">for</span>
								<span style="COLOR: #000000">(unsigned </span>
								<span style="COLOR: #0000ff">int</span>
								<span style="COLOR: #000000"> j(</span>
								<span style="COLOR: #000000">0</span>
								<span style="COLOR: #000000">);j</span>
								<span style="COLOR: #000000">&lt;=</span>
								<span style="COLOR: #000000">m_n;</span>
								<span style="COLOR: #000000">++</span>
								<span style="COLOR: #000000">j)<br /><img id="Codehighlighter1_521_574_Open_Image" onclick="this.style.display='none'; Codehighlighter1_521_574_Open_Text.style.display='none'; Codehighlighter1_521_574_Closed_Image.style.display='inline'; Codehighlighter1_521_574_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_521_574_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_521_574_Closed_Text.style.display='none'; Codehighlighter1_521_574_Open_Image.style.display='inline'; Codehighlighter1_521_574_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />        </span>
								<span id="Codehighlighter1_521_574_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
										<img src="http://www.cppblog.com/images/dot.gif" />
								</span>
								<span id="Codehighlighter1_521_574_Open_Text">
										<span style="COLOR: #000000">{    <br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />            cin</span>
										<span style="COLOR: #000000">&gt;&gt;</span>
										<span style="COLOR: #000000">dtemp;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />            m_equset[i].push_back(dtemp);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />        }</span>
								</span>
								<span style="COLOR: #000000">
										<br />
										<img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(m_equset[i].size()</span>
								<span style="COLOR: #000000">!=</span>
								<span style="COLOR: #000000">m_n</span>
								<span style="COLOR: #000000">+</span>
								<span style="COLOR: #000000">1</span>
								<span style="COLOR: #000000">)<br /><img id="Codehighlighter1_610_657_Open_Image" onclick="this.style.display='none'; Codehighlighter1_610_657_Open_Text.style.display='none'; Codehighlighter1_610_657_Closed_Image.style.display='inline'; Codehighlighter1_610_657_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_610_657_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_610_657_Closed_Text.style.display='none'; Codehighlighter1_610_657_Open_Image.style.display='inline'; Codehighlighter1_610_657_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />        </span>
								<span id="Codehighlighter1_610_657_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
										<img src="http://www.cppblog.com/images/dot.gif" />
								</span>
								<span id="Codehighlighter1_610_657_Open_Text">
										<span style="COLOR: #000000">{<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />            cout</span>
										<span style="COLOR: #000000">&lt;&lt;</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">输入有误，请重新输入上一个方程。</span>
										<span style="COLOR: #000000">"</span>
										<span style="COLOR: #000000">&lt;&lt;</span>
										<span style="COLOR: #000000">endl;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />            </span>
										<span style="COLOR: #000000">--</span>
										<span style="COLOR: #000000">i;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />        }</span>
								</span>
								<span style="COLOR: #000000">
										<br />
										<img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span>
						</span>
						<span style="COLOR: #000000">
								<br />
								<img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    <br /><img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span>
				</span>
				<span style="COLOR: #000000">
						<br />
						<img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />
						<br />
						<img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #0000ff">void</span>
				<span style="COLOR: #000000"> CGAUSSSOLVEEQU::solveEquSet()<br /><img id="Codehighlighter1_702_1519_Open_Image" onclick="this.style.display='none'; Codehighlighter1_702_1519_Open_Text.style.display='none'; Codehighlighter1_702_1519_Closed_Image.style.display='inline'; Codehighlighter1_702_1519_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_702_1519_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_702_1519_Closed_Text.style.display='none'; Codehighlighter1_702_1519_Open_Image.style.display='inline'; Codehighlighter1_702_1519_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span>
				<span id="Codehighlighter1_702_1519_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
						<img src="http://www.cppblog.com/images/dot.gif" />
				</span>
				<span id="Codehighlighter1_702_1519_Open_Text">
						<span style="COLOR: #000000">{<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    vector</span>
						<span style="COLOR: #000000">&lt;</span>
						<span style="COLOR: #000000">vector</span>
						<span style="COLOR: #000000">&lt;</span>
						<span style="COLOR: #0000ff">double</span>
						<span style="COLOR: #000000">&gt;&gt;</span>
						<span style="COLOR: #000000">::iterator iter;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    iter</span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000">m_equset.begin();<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
						<span style="COLOR: #0000ff">for</span>
						<span style="COLOR: #000000">(unsigned </span>
						<span style="COLOR: #0000ff">int</span>
						<span style="COLOR: #000000"> m(</span>
						<span style="COLOR: #000000">0</span>
						<span style="COLOR: #000000">);m</span>
						<span style="COLOR: #000000">&lt;</span>
						<span style="COLOR: #000000">m_n</span>
						<span style="COLOR: #000000">-</span>
						<span style="COLOR: #000000">1</span>
						<span style="COLOR: #000000">;</span>
						<span style="COLOR: #000000">++</span>
						<span style="COLOR: #000000">m)<br /><img id="Codehighlighter1_805_1202_Open_Image" onclick="this.style.display='none'; Codehighlighter1_805_1202_Open_Text.style.display='none'; Codehighlighter1_805_1202_Closed_Image.style.display='inline'; Codehighlighter1_805_1202_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_805_1202_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_805_1202_Closed_Text.style.display='none'; Codehighlighter1_805_1202_Open_Image.style.display='inline'; Codehighlighter1_805_1202_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span>
						<span id="Codehighlighter1_805_1202_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
								<img src="http://www.cppblog.com/images/dot.gif" />
						</span>
						<span id="Codehighlighter1_805_1202_Open_Text">
								<span style="COLOR: #000000">{<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        </span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">将绝对值最大的主元素移上去。此举是为了减少误差</span>
								<span style="COLOR: #008000">
										<br />
										<img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />
								</span>
								<span style="COLOR: #000000">        </span>
								<span style="COLOR: #0000ff">for</span>
								<span style="COLOR: #000000">(vector</span>
								<span style="COLOR: #000000">&lt;</span>
								<span style="COLOR: #000000">vector</span>
								<span style="COLOR: #000000">&lt;</span>
								<span style="COLOR: #0000ff">double</span>
								<span style="COLOR: #000000">&gt;&gt;</span>
								<span style="COLOR: #000000">::iterator iter2</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">iter</span>
								<span style="COLOR: #000000">+</span>
								<span style="COLOR: #000000">1</span>
								<span style="COLOR: #000000">;iter2</span>
								<span style="COLOR: #000000">!=</span>
								<span style="COLOR: #000000">m_equset.end();</span>
								<span style="COLOR: #000000">++</span>
								<span style="COLOR: #000000">iter2)<br /><img id="Codehighlighter1_911_999_Open_Image" onclick="this.style.display='none'; Codehighlighter1_911_999_Open_Text.style.display='none'; Codehighlighter1_911_999_Closed_Image.style.display='inline'; Codehighlighter1_911_999_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_911_999_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_911_999_Closed_Text.style.display='none'; Codehighlighter1_911_999_Open_Image.style.display='inline'; Codehighlighter1_911_999_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />        </span>
								<span id="Codehighlighter1_911_999_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
										<img src="http://www.cppblog.com/images/dot.gif" />
								</span>
								<span id="Codehighlighter1_911_999_Open_Text">
										<span style="COLOR: #000000">{<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />            </span>
										<span style="COLOR: #0000ff">if</span>
										<span style="COLOR: #000000">(fabsl(iter</span>
										<span style="COLOR: #000000">-&gt;</span>
										<span style="COLOR: #000000">front())</span>
										<span style="COLOR: #000000">&lt;</span>
										<span style="COLOR: #000000">fabsl(iter2</span>
										<span style="COLOR: #000000">-&gt;</span>
										<span style="COLOR: #000000">front()))<br /><img id="Codehighlighter1_966_995_Open_Image" onclick="this.style.display='none'; Codehighlighter1_966_995_Open_Text.style.display='none'; Codehighlighter1_966_995_Closed_Image.style.display='inline'; Codehighlighter1_966_995_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_966_995_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_966_995_Closed_Text.style.display='none'; Codehighlighter1_966_995_Open_Image.style.display='inline'; Codehighlighter1_966_995_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />            </span>
										<span id="Codehighlighter1_966_995_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
												<img src="http://www.cppblog.com/images/dot.gif" />
										</span>
										<span id="Codehighlighter1_966_995_Open_Text">
												<span style="COLOR: #000000">{<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />                swap(</span>
												<span style="COLOR: #000000">*</span>
												<span style="COLOR: #000000">iter,</span>
												<span style="COLOR: #000000">*</span>
												<span style="COLOR: #000000">iter2);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />            }</span>
										</span>
										<span style="COLOR: #000000">
												<br />
												<img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />        }</span>
								</span>
								<span style="COLOR: #000000">
										<br />
										<img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        </span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">进行消元</span>
								<span style="COLOR: #008000">
										<br />
										<img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />
								</span>
								<span style="COLOR: #000000">        </span>
								<span style="COLOR: #0000ff">for</span>
								<span style="COLOR: #000000">(unsigned </span>
								<span style="COLOR: #0000ff">int</span>
								<span style="COLOR: #000000"> i</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">m</span>
								<span style="COLOR: #000000">+</span>
								<span style="COLOR: #000000">1</span>
								<span style="COLOR: #000000">;i</span>
								<span style="COLOR: #000000">&lt;</span>
								<span style="COLOR: #000000">m_n;</span>
								<span style="COLOR: #000000">++</span>
								<span style="COLOR: #000000">i)<br /><img id="Codehighlighter1_1048_1189_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1048_1189_Open_Text.style.display='none'; Codehighlighter1_1048_1189_Closed_Image.style.display='inline'; Codehighlighter1_1048_1189_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_1048_1189_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1048_1189_Closed_Text.style.display='none'; Codehighlighter1_1048_1189_Open_Image.style.display='inline'; Codehighlighter1_1048_1189_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />        </span>
								<span id="Codehighlighter1_1048_1189_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
										<img src="http://www.cppblog.com/images/dot.gif" />
								</span>
								<span id="Codehighlighter1_1048_1189_Open_Text">
										<span style="COLOR: #000000">{<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />            </span>
										<span style="COLOR: #0000ff">double</span>
										<span style="COLOR: #000000"> dm;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />            dm</span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #000000">m_equset[i][m]</span>
										<span style="COLOR: #000000">/</span>
										<span style="COLOR: #000000">m_equset[m][m];<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />            </span>
										<span style="COLOR: #0000ff">for</span>
										<span style="COLOR: #000000">(unsigned </span>
										<span style="COLOR: #0000ff">int</span>
										<span style="COLOR: #000000"> j</span>
										<span style="COLOR: #000000">=</span>
										<span style="COLOR: #000000">m;j</span>
										<span style="COLOR: #000000">&lt;</span>
										<span style="COLOR: #000000">m_n</span>
										<span style="COLOR: #000000">+</span>
										<span style="COLOR: #000000">1</span>
										<span style="COLOR: #000000">;</span>
										<span style="COLOR: #000000">++</span>
										<span style="COLOR: #000000">j)<br /><img id="Codehighlighter1_1141_1185_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1141_1185_Open_Text.style.display='none'; Codehighlighter1_1141_1185_Closed_Image.style.display='inline'; Codehighlighter1_1141_1185_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_1141_1185_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1141_1185_Closed_Text.style.display='none'; Codehighlighter1_1141_1185_Open_Image.style.display='inline'; Codehighlighter1_1141_1185_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />            </span>
										<span id="Codehighlighter1_1141_1185_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
												<img src="http://www.cppblog.com/images/dot.gif" />
										</span>
										<span id="Codehighlighter1_1141_1185_Open_Text">
												<span style="COLOR: #000000">{<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />                m_equset[i][j]</span>
												<span style="COLOR: #000000">-=</span>
												<span style="COLOR: #000000">dm</span>
												<span style="COLOR: #000000">*</span>
												<span style="COLOR: #000000">m_equset[m][j];<br /><img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />            }</span>
										</span>
										<span style="COLOR: #000000">
												<br />
												<img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />        }</span>
								</span>
								<span style="COLOR: #000000">
										<br />
										<img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        </span>
								<span style="COLOR: #000000">++</span>
								<span style="COLOR: #000000">iter;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span>
						</span>
						<span style="COLOR: #000000">
								<br />
								<img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
						<span style="COLOR: #008000">//</span>
						<span style="COLOR: #008000">初始化m_answer向量</span>
						<span style="COLOR: #008000">
								<br />
								<img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />
						</span>
						<span style="COLOR: #000000">    </span>
						<span style="COLOR: #0000ff">for</span>
						<span style="COLOR: #000000">(unsigned </span>
						<span style="COLOR: #0000ff">int</span>
						<span style="COLOR: #000000"> i(</span>
						<span style="COLOR: #000000">0</span>
						<span style="COLOR: #000000">);i</span>
						<span style="COLOR: #000000">&lt;</span>
						<span style="COLOR: #000000">m_n;</span>
						<span style="COLOR: #000000">++</span>
						<span style="COLOR: #000000">i) m_answer.push_back(</span>
						<span style="COLOR: #000000">0</span>
						<span style="COLOR: #000000">);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
						<span style="COLOR: #008000">//</span>
						<span style="COLOR: #008000">求解答案</span>
						<span style="COLOR: #008000">
								<br />
								<img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />
						</span>
						<span style="COLOR: #000000">    m_answer[m_n</span>
						<span style="COLOR: #000000">-</span>
						<span style="COLOR: #000000">1</span>
						<span style="COLOR: #000000">]</span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000">m_equset[m_n</span>
						<span style="COLOR: #000000">-</span>
						<span style="COLOR: #000000">1</span>
						<span style="COLOR: #000000">][m_n]</span>
						<span style="COLOR: #000000">/</span>
						<span style="COLOR: #000000">m_equset[m_n</span>
						<span style="COLOR: #000000">-</span>
						<span style="COLOR: #000000">1</span>
						<span style="COLOR: #000000">][m_n</span>
						<span style="COLOR: #000000">-</span>
						<span style="COLOR: #000000">1</span>
						<span style="COLOR: #000000">];<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
						<span style="COLOR: #0000ff">for</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #0000ff">int</span>
						<span style="COLOR: #000000"> i</span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000">m_n</span>
						<span style="COLOR: #000000">-</span>
						<span style="COLOR: #000000">2</span>
						<span style="COLOR: #000000">;i</span>
						<span style="COLOR: #000000">&gt;=</span>
						<span style="COLOR: #000000">0</span>
						<span style="COLOR: #000000">;</span>
						<span style="COLOR: #000000">--</span>
						<span style="COLOR: #000000">i)<br /><img id="Codehighlighter1_1377_1514_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1377_1514_Open_Text.style.display='none'; Codehighlighter1_1377_1514_Closed_Image.style.display='inline'; Codehighlighter1_1377_1514_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_1377_1514_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1377_1514_Closed_Text.style.display='none'; Codehighlighter1_1377_1514_Open_Image.style.display='inline'; Codehighlighter1_1377_1514_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span>
						<span id="Codehighlighter1_1377_1514_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
								<img src="http://www.cppblog.com/images/dot.gif" />
						</span>
						<span id="Codehighlighter1_1377_1514_Open_Text">
								<span style="COLOR: #000000">{<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        m_answer[i]</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">m_equset[i][m_n];<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">for</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #0000ff">int</span>
								<span style="COLOR: #000000"> j</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">m_n</span>
								<span style="COLOR: #000000">-</span>
								<span style="COLOR: #000000">1</span>
								<span style="COLOR: #000000">;j</span>
								<span style="COLOR: #000000">&gt;</span>
								<span style="COLOR: #000000">i;</span>
								<span style="COLOR: #000000">--</span>
								<span style="COLOR: #000000">j)<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />            m_answer[i]</span>
								<span style="COLOR: #000000">-=</span>
								<span style="COLOR: #000000">m_answer[j]</span>
								<span style="COLOR: #000000">*</span>
								<span style="COLOR: #000000">m_equset[i][j];<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        m_answer[i]</span>
								<span style="COLOR: #000000">/=</span>
								<span style="COLOR: #000000">m_equset[i][i];<br /><img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span>
						</span>
						<span style="COLOR: #000000">
								<br />
								<img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />
								<br />
								<img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    <br /><img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span>
				</span>
				<span style="COLOR: #000000">
						<br />
						<img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />
						<br />
						<img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #0000ff">void</span>
				<span style="COLOR: #000000"> CGAUSSSOLVEEQU::outputAnswer()<br /><img id="Codehighlighter1_1558_1645_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1558_1645_Open_Text.style.display='none'; Codehighlighter1_1558_1645_Closed_Image.style.display='inline'; Codehighlighter1_1558_1645_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_1558_1645_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1558_1645_Closed_Text.style.display='none'; Codehighlighter1_1558_1645_Open_Image.style.display='inline'; Codehighlighter1_1558_1645_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span>
				<span id="Codehighlighter1_1558_1645_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
						<img src="http://www.cppblog.com/images/dot.gif" />
				</span>
				<span id="Codehighlighter1_1558_1645_Open_Text">
						<span style="COLOR: #000000">{<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
						<span style="COLOR: #0000ff">for</span>
						<span style="COLOR: #000000">(unsigned </span>
						<span style="COLOR: #0000ff">int</span>
						<span style="COLOR: #000000"> i(</span>
						<span style="COLOR: #000000">1</span>
						<span style="COLOR: #000000">);i</span>
						<span style="COLOR: #000000">&lt;=</span>
						<span style="COLOR: #000000">m_n;</span>
						<span style="COLOR: #000000">++</span>
						<span style="COLOR: #000000">i)<br /><img id="Codehighlighter1_1596_1643_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1596_1643_Open_Text.style.display='none'; Codehighlighter1_1596_1643_Closed_Image.style.display='inline'; Codehighlighter1_1596_1643_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_1596_1643_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1596_1643_Closed_Text.style.display='none'; Codehighlighter1_1596_1643_Open_Image.style.display='inline'; Codehighlighter1_1596_1643_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span>
						<span id="Codehighlighter1_1596_1643_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
								<img src="http://www.cppblog.com/images/dot.gif" />
						</span>
						<span id="Codehighlighter1_1596_1643_Open_Text">
								<span style="COLOR: #000000">{<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        cout</span>
								<span style="COLOR: #000000">&lt;&lt;</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">x(</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">&lt;&lt;</span>
								<span style="COLOR: #000000">i</span>
								<span style="COLOR: #000000">&lt;&lt;</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">)=</span>
								<span style="COLOR: #000000">"</span>
								<span style="COLOR: #000000">&lt;&lt;</span>
								<span style="COLOR: #000000">m_answer[i</span>
								<span style="COLOR: #000000">-</span>
								<span style="COLOR: #000000">1</span>
								<span style="COLOR: #000000">]</span>
								<span style="COLOR: #000000">&lt;&lt;</span>
								<span style="COLOR: #000000">endl;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />    }</span>
						</span>
						<span style="COLOR: #000000">
								<br />
								<img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span>
				</span>
				<span style="COLOR: #000000">
						<br />
						<img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />
						<br />
						<img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #0000ff">int</span>
				<span style="COLOR: #000000"> main()<br /><img id="Codehighlighter1_1659_1762_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1659_1762_Open_Text.style.display='none'; Codehighlighter1_1659_1762_Closed_Image.style.display='inline'; Codehighlighter1_1659_1762_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_1659_1762_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1659_1762_Closed_Text.style.display='none'; Codehighlighter1_1659_1762_Open_Image.style.display='inline'; Codehighlighter1_1659_1762_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span>
				<span id="Codehighlighter1_1659_1762_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
						<img src="http://www.cppblog.com/images/dot.gif" />
				</span>
				<span id="Codehighlighter1_1659_1762_Open_Text">
						<span style="COLOR: #000000">{<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    CGAUSSSOLVEEQU myEqu;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    myEqu.inputEquSet();<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    myEqu.solveEquSet();<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    myEqu.outputAnswer();<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
						<span style="COLOR: #0000ff">return</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">0</span>
						<span style="COLOR: #000000">;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span>
				</span>
				<span style="COLOR: #000000">
						<br />
						<img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />
						<br />
						<img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #008000">//</span>
				<span style="COLOR: #008000">Power By Tauruser 2006.6.4</span>
		</div>
<img src ="http://www.cppblog.com/Tauruser/aggbug/8154.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/Tauruser/" target="_blank">Tauruser</a> 2006-06-04 20:22 <a href="http://www.cppblog.com/Tauruser/archive/2006/06/04/8154.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>使用AsycnSocket类进行简单双机通讯</title><link>http://www.cppblog.com/Tauruser/archive/2006/05/31/7926.html</link><dc:creator>Tauruser</dc:creator><author>Tauruser</author><pubDate>Wed, 31 May 2006 05:01:00 GMT</pubDate><guid>http://www.cppblog.com/Tauruser/archive/2006/05/31/7926.html</guid><wfw:comment>http://www.cppblog.com/Tauruser/comments/7926.html</wfw:comment><comments>http://www.cppblog.com/Tauruser/archive/2006/05/31/7926.html#Feedback</comments><slash:comments>4</slash:comments><wfw:commentRss>http://www.cppblog.com/Tauruser/comments/commentRss/7926.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/Tauruser/services/trackbacks/7926.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 这两天在研究				Windows Socket				编程，今天总算有了一点突破，把自己做的东西发上来。																																		CAsyncSocket				类在非常低的级别上封装				 Windows Sockets API				。																		CAsyncS...&nbsp;&nbsp;<a href='http://www.cppblog.com/Tauruser/archive/2006/05/31/7926.html'>阅读全文</a><img src ="http://www.cppblog.com/Tauruser/aggbug/7926.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/Tauruser/" target="_blank">Tauruser</a> 2006-05-31 13:01 <a href="http://www.cppblog.com/Tauruser/archive/2006/05/31/7926.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Romberg求积(例程)</title><link>http://www.cppblog.com/Tauruser/archive/2006/05/29/7796.html</link><dc:creator>Tauruser</dc:creator><author>Tauruser</author><pubDate>Mon, 29 May 2006 01:25:00 GMT</pubDate><guid>http://www.cppblog.com/Tauruser/archive/2006/05/29/7796.html</guid><wfw:comment>http://www.cppblog.com/Tauruser/comments/7796.html</wfw:comment><comments>http://www.cppblog.com/Tauruser/archive/2006/05/29/7796.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cppblog.com/Tauruser/comments/commentRss/7796.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/Tauruser/services/trackbacks/7796.html</trackback:ping><description><![CDATA[
		<p>先介绍一下Romberg求积。<br /><span class="section">6.3　外推原理与Romberg求积<br /></span><br /><span class="part">6.3.1　复合梯形公式递推化与节点加密</span><br /><br /><span class="text">　　在计算机上用等距节点求积公式时，若精度不够可以逐步加密节点.设将区间<img height="18" src="http://mclab.sysu.edu.cn/na/text/chap6/iamges/repair2.gif" width="37" align="absMiddle" />分为n等分，节点<img height="39" src="http://mclab.sysu.edu.cn/na/text/chap6/iamges/171.gif" width="138" align="absMiddle" />，在区间<img height="21" src="http://mclab.sysu.edu.cn/na/text/chap6/iamges/172.gif" width="57" align="absMiddle" />上梯形公式为<br />　　　　　　　　　　　　　<img height="45" src="http://mclab.sysu.edu.cn/na/text/chap6/iamges/173.gif" width="219" align="absMiddle" /><br />若节点加密一倍，区间长为<img height="40" src="http://mclab.sysu.edu.cn/na/text/chap6/iamges/174.gif" width="35" align="absMiddle" />，记<img height="21" src="http://mclab.sysu.edu.cn/na/text/chap6/iamges/172.gif" width="57" align="absMiddle" />中点为<img height="18" src="http://mclab.sysu.edu.cn/na/text/chap6/iamges/175.gif" width="32" align="absMiddle" />在同一区间<img height="21" src="http://mclab.sysu.edu.cn/na/text/chap6/iamges/172.gif" width="57" align="absMiddle" />上的复合梯形公式惟<br />　　　　　　　　　　　　　<img height="37" src="http://mclab.sysu.edu.cn/na/text/chap6/iamges/176.gif" width="302" align="absMiddle" /><br />于是<br />　<img height="44" src="http://mclab.sysu.edu.cn/na/text/chap6/iamges/177.gif" width="400" align="absMiddle" />　　　　　　(6.3.1)<br />它表明<img height="22" src="http://mclab.sysu.edu.cn/na/text/chap6/iamges/178.gif" width="22" align="absMiddle" />是在<img height="36" src="http://mclab.sysu.edu.cn/na/text/chap6/iamges/179.gif" width="28" align="absMiddle" />的基础上再加新节点<img height="23" src="http://mclab.sysu.edu.cn/na/text/chap6/iamges/180.gif" width="33" align="absMiddle" />的函数值之和乘新区间长<img height="38" src="http://mclab.sysu.edu.cn/na/text/chap6/iamges/181.gif" width="14" align="absMiddle" />，而不必用(6.2.6)重新计算<img height="22" src="http://mclab.sysu.edu.cn/na/text/chap6/iamges/178.gif" width="22" align="absMiddle" />，这时有误差估计式<br />　　　　　　　　　　　　　<img height="83" src="http://mclab.sysu.edu.cn/na/text/chap6/iamges/182.gif" width="270" align="absMiddle" /><br />若<img height="21" src="http://mclab.sysu.edu.cn/na/text/chap6/iamges/183.gif" width="90" align="absMiddle" />，则得<br />　　　　　　　<img height="51" src="http://mclab.sysu.edu.cn/na/text/chap6/iamges/184.gif" width="265" align="absMiddle" />　　　　　(6.3.2)<br />它表明用<img height="22" src="http://mclab.sysu.edu.cn/na/text/chap6/iamges/185.gif" width="68" align="absMiddle" />，其误差近似<img height="41" src="http://mclab.sysu.edu.cn/na/text/chap6/iamges/186.gif" width="71" align="absMiddle" />.这也是在计算机上估计梯形公式误差的近似表达式.若<img height="40" src="http://mclab.sysu.edu.cn/na/text/chap6/iamges/187.gif" width="94" align="absMiddle" />(给定精度)，则<img height="23" src="http://mclab.sysu.edu.cn/na/text/chap6/iamges/188.gif" width="60" align="absMiddle" />.<br />　　若在区间［a,b］中做2n等分时，在<img height="21" src="http://mclab.sysu.edu.cn/na/text/chap6/iamges/172.gif" width="57" align="absMiddle" />上用Simpson公式计算，则由(6.2.8)可知<br />　　　<img height="41" src="http://mclab.sysu.edu.cn/na/text/chap6/iamges/189.gif" width="542" align="absBottom" /><br />它恰好是(6.3.2)中I(f)的近似值，即<br /><img height="42" src="http://mclab.sysu.edu.cn/na/text/chap6/iamges/190.gif" width="158" align="absMiddle" /><br />它表明用(6.3.2)计算I(f)，其精度已由<img height="23" src="http://mclab.sysu.edu.cn/na/text/chap6/iamges/191.gif" width="116" align="absMiddle" />提高到<img height="22" src="http://mclab.sysu.edu.cn/na/text/chap6/iamges/192.gif" width="111" align="absMiddle" />如果再将区间分半，使<img height="21" src="http://mclab.sysu.edu.cn/na/text/chap6/iamges/172.gif" width="57" align="absMiddle" />分为4个小区间，长度为<img height="37" src="http://mclab.sysu.edu.cn/na/text/chap6/iamges/193.gif" width="14" align="absMiddle" />，则可由(6.3.1)计算出<img height="20" src="http://mclab.sysu.edu.cn/na/text/chap6/iamges/194.gif" width="21" align="absMiddle" />及<img height="20" src="http://mclab.sysu.edu.cn/na/text/chap6/iamges/195.gif" width="22" align="absMiddle" />，利用复合公式余项(6.2.9)得<br />　　　　　　　　　<img height="42" src="http://mclab.sysu.edu.cn/na/text/chap6/iamges/196.gif" width="266" align="absMiddle" /><br />　　　　　　　　　<img height="35" src="http://mclab.sysu.edu.cn/na/text/chap6/iamges/197.gif" width="277" align="absMiddle" /><br />如果<img height="21" src="http://mclab.sysu.edu.cn/na/text/chap6/iamges/198.gif" width="110" align="absMiddle" />，则有<br />　　　　　　　　　<img height="44" src="http://mclab.sysu.edu.cn/na/text/chap6/iamges/199.gif" width="288" align="absMiddle" />　　　　　　(6.3.3)<br />从而有复合Simpson公式的误差估计<br />　　　　　　　　　<img height="36" src="http://mclab.sysu.edu.cn/na/text/chap6/iamges/200.gif" width="166" align="absMiddle" /><br />如果用(6.3.3)近似<img height="21" src="http://mclab.sysu.edu.cn/na/text/chap6/iamges/200_.gif" width="29" align="absMiddle" />，即<br />　　　　　　　　　<img height="41" src="http://mclab.sysu.edu.cn/na/text/chap6/iamges/201.gif" width="141" align="absMiddle" />　　　　　　(6.3.4)<br />则精度可达到<img height="20" src="http://mclab.sysu.edu.cn/na/text/chap6/iamges/202.gif" width="39" align="absMiddle" />.类似做法还可继续下去.这样对区间<img height="18" src="http://mclab.sysu.edu.cn/na/text/chap6/iamges/repair2.gif" width="37" align="absMiddle" />逐次分半，利用公式(6.3.1)逐次递推.再由(6.3.2)，(6.3.3)逐次构造出精度愈来愈高的计算积分I(f)的公式，这就是Romberg求积的基本思想.<br /><br />以下为我自己写的求积程序。<br /></span></p>
		<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
				<img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />
				<span style="COLOR: #008000">//</span>
				<span style="COLOR: #008000"> RombergIntegral.cpp : 定义控制台应用程序的入口点。<br /><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" /></span>
				<span style="COLOR: #008000">//<br /><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" /></span>
				<span style="COLOR: #000000">
						<br />
						<img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />#include </span>
				<span style="COLOR: #000000">&lt;</span>
				<span style="COLOR: #000000">cmath</span>
				<span style="COLOR: #000000">&gt;</span>
				<span style="COLOR: #000000">
						<br />
						<img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />#include </span>
				<span style="COLOR: #000000">&lt;</span>
				<span style="COLOR: #000000">iostream</span>
				<span style="COLOR: #000000">&gt;</span>
				<span style="COLOR: #000000">
						<br />
						<img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />#include </span>
				<span style="COLOR: #000000">&lt;</span>
				<span style="COLOR: #000000">vector</span>
				<span style="COLOR: #000000">&gt;</span>
				<span style="COLOR: #000000">
						<br />
						<img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #0000ff">using</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">namespace</span>
				<span style="COLOR: #000000"> std;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" /></span>
				<span style="COLOR: #0000ff">const</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #0000ff">double</span>
				<span style="COLOR: #000000"> PRECISION(.</span>
				<span style="COLOR: #000000">000001</span>
				<span style="COLOR: #000000">);</span>
				<span style="COLOR: #008000">//</span>
				<span style="COLOR: #008000">精度控制</span>
				<span style="COLOR: #008000">
						<br />
						<img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #0000ff">const</span>
				<span style="COLOR: #000000"> unsigned </span>
				<span style="COLOR: #0000ff">int</span>
				<span style="COLOR: #000000"> MAXK(</span>
				<span style="COLOR: #000000">20</span>
				<span style="COLOR: #000000">);</span>
				<span style="COLOR: #008000">//</span>
				<span style="COLOR: #008000">求解步骤控制</span>
				<span style="COLOR: #008000">
						<br />
						<img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #0000ff">double</span>
				<span style="COLOR: #000000"> RombergIntegral(</span>
				<span style="COLOR: #0000ff">double</span>
				<span style="COLOR: #000000"> (</span>
				<span style="COLOR: #000000">*</span>
				<span style="COLOR: #000000">f)(</span>
				<span style="COLOR: #0000ff">double</span>
				<span style="COLOR: #000000"> x),</span>
				<span style="COLOR: #0000ff">double</span>
				<span style="COLOR: #000000"> a, </span>
				<span style="COLOR: #0000ff">double</span>
				<span style="COLOR: #000000"> b);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />vector</span>
				<span style="COLOR: #000000">&lt;</span>
				<span style="COLOR: #000000">vector</span>
				<span style="COLOR: #000000">&lt;</span>
				<span style="COLOR: #0000ff">double</span>
				<span style="COLOR: #000000">&gt;&gt;</span>
				<span style="COLOR: #000000"> T;</span>
				<span style="COLOR: #008000">//</span>
				<span style="COLOR: #008000">用于存储T表</span>
				<span style="COLOR: #008000">
						<br />
						<img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #0000ff">double</span>
				<span style="COLOR: #000000"> f(</span>
				<span style="COLOR: #0000ff">double</span>
				<span style="COLOR: #000000"> x)</span>
				<span style="COLOR: #008000">//</span>
				<span style="COLOR: #008000">要求的积分函数</span>
				<span style="COLOR: #008000">
						<br />
						<img id="Codehighlighter1_324_344_Open_Image" onclick="this.style.display='none'; Codehighlighter1_324_344_Open_Text.style.display='none'; Codehighlighter1_324_344_Closed_Image.style.display='inline'; Codehighlighter1_324_344_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" />
						<img id="Codehighlighter1_324_344_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_324_344_Closed_Text.style.display='none'; Codehighlighter1_324_344_Open_Image.style.display='inline'; Codehighlighter1_324_344_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedBlock.gif" align="top" />
				</span>
				<span id="Codehighlighter1_324_344_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
						<img src="http://www.cppblog.com/images/dot.gif" />
				</span>
				<span id="Codehighlighter1_324_344_Open_Text">
						<span style="COLOR: #000000">{<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
						<span style="COLOR: #0000ff">return</span>
						<span style="COLOR: #000000"> x</span>
						<span style="COLOR: #000000">*</span>
						<span style="COLOR: #000000">sin(x);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span>
				</span>
				<span style="COLOR: #000000">
						<br />
						<img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #0000ff">int</span>
				<span style="COLOR: #000000"> _tmain(</span>
				<span style="COLOR: #0000ff">int</span>
				<span style="COLOR: #000000"> argc, _TCHAR</span>
				<span style="COLOR: #000000">*</span>
				<span style="COLOR: #000000"> argv[])<br /><img id="Codehighlighter1_383_526_Open_Image" onclick="this.style.display='none'; Codehighlighter1_383_526_Open_Text.style.display='none'; Codehighlighter1_383_526_Closed_Image.style.display='inline'; Codehighlighter1_383_526_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_383_526_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_383_526_Closed_Text.style.display='none'; Codehighlighter1_383_526_Open_Image.style.display='inline'; Codehighlighter1_383_526_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span>
				<span id="Codehighlighter1_383_526_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
						<img src="http://www.cppblog.com/images/dot.gif" />
				</span>
				<span id="Codehighlighter1_383_526_Open_Text">
						<span style="COLOR: #000000">{<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    cout</span>
						<span style="COLOR: #000000">&lt;&lt;</span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000">本程序用于求解函数f(x)=x*sin(x)在0到6.28的积分</span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000">&lt;&lt;</span>
						<span style="COLOR: #000000">endl;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    cout</span>
						<span style="COLOR: #000000">&lt;&lt;</span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000">积分结果为：</span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000">&lt;&lt;</span>
						<span style="COLOR: #000000">RombergIntegral(f,</span>
						<span style="COLOR: #000000">0</span>
						<span style="COLOR: #000000">,</span>
						<span style="COLOR: #000000">6.28</span>
						<span style="COLOR: #000000">)</span>
						<span style="COLOR: #000000">&lt;&lt;</span>
						<span style="COLOR: #000000">endl;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    cout</span>
						<span style="COLOR: #000000">&lt;&lt;</span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000">精度为</span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000">&lt;&lt;</span>
						<span style="COLOR: #000000">PRECISION</span>
						<span style="COLOR: #000000">&lt;&lt;</span>
						<span style="COLOR: #000000">endl;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
						<span style="COLOR: #0000ff">return</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">0</span>
						<span style="COLOR: #000000">;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span>
				</span>
				<span style="COLOR: #000000">
						<br />
						<img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />
						<br />
						<img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #0000ff">double</span>
				<span style="COLOR: #000000"> RombergIntegral(</span>
				<span style="COLOR: #0000ff">double</span>
				<span style="COLOR: #000000"> (</span>
				<span style="COLOR: #000000">*</span>
				<span style="COLOR: #000000">f)(</span>
				<span style="COLOR: #0000ff">double</span>
				<span style="COLOR: #000000"> x),</span>
				<span style="COLOR: #0000ff">double</span>
				<span style="COLOR: #000000"> a, </span>
				<span style="COLOR: #0000ff">double</span>
				<span style="COLOR: #000000"> b)<br /><img id="Codehighlighter1_594_1096_Open_Image" onclick="this.style.display='none'; Codehighlighter1_594_1096_Open_Text.style.display='none'; Codehighlighter1_594_1096_Closed_Image.style.display='inline'; Codehighlighter1_594_1096_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_594_1096_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_594_1096_Closed_Text.style.display='none'; Codehighlighter1_594_1096_Open_Image.style.display='inline'; Codehighlighter1_594_1096_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span>
				<span id="Codehighlighter1_594_1096_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
						<img src="http://www.cppblog.com/images/dot.gif" />
				</span>
				<span id="Codehighlighter1_594_1096_Open_Text">
						<span style="COLOR: #000000">{<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
						<span style="COLOR: #0000ff">int</span>
						<span style="COLOR: #000000"> k(</span>
						<span style="COLOR: #000000">0</span>
						<span style="COLOR: #000000">);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
						<span style="COLOR: #0000ff">double</span>
						<span style="COLOR: #000000"> h</span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000">b</span>
						<span style="COLOR: #000000">-</span>
						<span style="COLOR: #000000">a;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    vector</span>
						<span style="COLOR: #000000">&lt;</span>
						<span style="COLOR: #0000ff">double</span>
						<span style="COLOR: #000000">&gt;</span>
						<span style="COLOR: #000000"> temp;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    T.push_back(temp);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    T[</span>
						<span style="COLOR: #000000">0</span>
						<span style="COLOR: #000000">].push_back(h</span>
						<span style="COLOR: #000000">*</span>
						<span style="COLOR: #000000">((</span>
						<span style="COLOR: #000000">*</span>
						<span style="COLOR: #000000">f)(a)</span>
						<span style="COLOR: #000000">+</span>
						<span style="COLOR: #000000">(</span>
						<span style="COLOR: #000000">*</span>
						<span style="COLOR: #000000">f)(b))</span>
						<span style="COLOR: #000000">/</span>
						<span style="COLOR: #000000">2</span>
						<span style="COLOR: #000000">);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
						<span style="COLOR: #0000ff">for</span>
						<span style="COLOR: #000000">(k</span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000">1</span>
						<span style="COLOR: #000000">;</span>
						<span style="COLOR: #000000">1</span>
						<span style="COLOR: #000000">;</span>
						<span style="COLOR: #000000">++</span>
						<span style="COLOR: #000000">k)<br /><img id="Codehighlighter1_721_1071_Open_Image" onclick="this.style.display='none'; Codehighlighter1_721_1071_Open_Text.style.display='none'; Codehighlighter1_721_1071_Closed_Image.style.display='inline'; Codehighlighter1_721_1071_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_721_1071_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_721_1071_Closed_Text.style.display='none'; Codehighlighter1_721_1071_Open_Image.style.display='inline'; Codehighlighter1_721_1071_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />    </span>
						<span id="Codehighlighter1_721_1071_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
								<img src="http://www.cppblog.com/images/dot.gif" />
						</span>
						<span id="Codehighlighter1_721_1071_Open_Text">
								<span style="COLOR: #000000">{<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        T.push_back(temp);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        T[</span>
								<span style="COLOR: #000000">0</span>
								<span style="COLOR: #000000">].push_back(</span>
								<span style="COLOR: #000000">0.5</span>
								<span style="COLOR: #000000">*</span>
								<span style="COLOR: #000000">T[</span>
								<span style="COLOR: #000000">0</span>
								<span style="COLOR: #000000">][k</span>
								<span style="COLOR: #000000">-</span>
								<span style="COLOR: #000000">1</span>
								<span style="COLOR: #000000">]);<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">for</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #0000ff">int</span>
								<span style="COLOR: #000000"> i</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">0</span>
								<span style="COLOR: #000000">;i</span>
								<span style="COLOR: #000000">&lt;</span>
								<span style="COLOR: #000000">pow(</span>
								<span style="COLOR: #000000">2</span>
								<span style="COLOR: #000000">.,k</span>
								<span style="COLOR: #000000">-</span>
								<span style="COLOR: #000000">1</span>
								<span style="COLOR: #000000">);</span>
								<span style="COLOR: #000000">++</span>
								<span style="COLOR: #000000">i)<br /><img id="Codehighlighter1_812_853_Open_Image" onclick="this.style.display='none'; Codehighlighter1_812_853_Open_Text.style.display='none'; Codehighlighter1_812_853_Closed_Image.style.display='inline'; Codehighlighter1_812_853_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_812_853_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_812_853_Closed_Text.style.display='none'; Codehighlighter1_812_853_Open_Image.style.display='inline'; Codehighlighter1_812_853_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />        </span>
								<span id="Codehighlighter1_812_853_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
										<img src="http://www.cppblog.com/images/dot.gif" />
								</span>
								<span id="Codehighlighter1_812_853_Open_Text">
										<span style="COLOR: #000000">{<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />            T[</span>
										<span style="COLOR: #000000">0</span>
										<span style="COLOR: #000000">][k]</span>
										<span style="COLOR: #000000">+=</span>
										<span style="COLOR: #000000">0.5</span>
										<span style="COLOR: #000000">*</span>
										<span style="COLOR: #000000">h</span>
										<span style="COLOR: #000000">*</span>
										<span style="COLOR: #000000">((</span>
										<span style="COLOR: #000000">*</span>
										<span style="COLOR: #000000">f)(a</span>
										<span style="COLOR: #000000">+</span>
										<span style="COLOR: #000000">h</span>
										<span style="COLOR: #000000">/</span>
										<span style="COLOR: #000000">2</span>
										<span style="COLOR: #000000">+</span>
										<span style="COLOR: #000000">i</span>
										<span style="COLOR: #000000">*</span>
										<span style="COLOR: #000000">h));<br /><img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />        }</span>
								</span>
								<span style="COLOR: #000000">
										<br />
										<img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">for</span>
								<span style="COLOR: #000000">(</span>
								<span style="COLOR: #0000ff">int</span>
								<span style="COLOR: #000000"> i</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">1</span>
								<span style="COLOR: #000000">;i</span>
								<span style="COLOR: #000000">&lt;=</span>
								<span style="COLOR: #000000">k;</span>
								<span style="COLOR: #000000">++</span>
								<span style="COLOR: #000000">i)<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />            T[i].push_back((pow(</span>
								<span style="COLOR: #000000">4</span>
								<span style="COLOR: #000000">.,i)</span>
								<span style="COLOR: #000000">*</span>
								<span style="COLOR: #000000">T[i</span>
								<span style="COLOR: #000000">-</span>
								<span style="COLOR: #000000">1</span>
								<span style="COLOR: #000000">].back()</span>
								<span style="COLOR: #000000">-</span>
								<span style="COLOR: #000000">T[i</span>
								<span style="COLOR: #000000">-</span>
								<span style="COLOR: #000000">1</span>
								<span style="COLOR: #000000">][T[i</span>
								<span style="COLOR: #000000">-</span>
								<span style="COLOR: #000000">1</span>
								<span style="COLOR: #000000">].size()</span>
								<span style="COLOR: #000000">-</span>
								<span style="COLOR: #000000">2</span>
								<span style="COLOR: #000000">])</span>
								<span style="COLOR: #000000">/</span>
								<span style="COLOR: #000000">(pow(</span>
								<span style="COLOR: #000000">4</span>
								<span style="COLOR: #000000">.,i)</span>
								<span style="COLOR: #000000">-</span>
								<span style="COLOR: #000000">1</span>
								<span style="COLOR: #000000">));<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        h</span>
								<span style="COLOR: #000000">/=</span>
								<span style="COLOR: #000000">2</span>
								<span style="COLOR: #000000">;<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">double</span>
								<span style="COLOR: #000000"> temp</span>
								<span style="COLOR: #000000">=</span>
								<span style="COLOR: #000000">T[k].back();<br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />        </span>
								<span style="COLOR: #0000ff">if</span>
								<span style="COLOR: #000000">(fabs(T[k].front()</span>
								<span style="COLOR: #000000">-</span>
								<span style="COLOR: #000000">T[k</span>
								<span style="COLOR: #000000">-</span>
								<span style="COLOR: #000000">1</span>
								<span style="COLOR: #000000">].front())</span>
								<span style="COLOR: #000000">&lt;</span>
								<span style="COLOR: #000000">PRECISION </span>
								<span style="COLOR: #000000">||</span>
								<span style="COLOR: #000000">  k</span>
								<span style="COLOR: #000000">==</span>
								<span style="COLOR: #000000">MAXK) </span>
								<span style="COLOR: #0000ff">break</span>
								<span style="COLOR: #000000">;</span>
								<span style="COLOR: #008000">//</span>
								<span style="COLOR: #008000">到</span>
								<span style="COLOR: #008000">
										<br />
										<img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />
								</span>
								<span style="COLOR: #000000">    }</span>
						</span>
						<span style="COLOR: #000000">
								<br />
								<img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    <br /><img src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align="top" />    </span>
						<span style="COLOR: #0000ff">return</span>
						<span style="COLOR: #000000"> T[k].back();<br /><img src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span>
				</span>
				<span style="COLOR: #000000">
						<br />
						<img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />
						<br />
						<img src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align="top" />
				</span>
				<span style="COLOR: #008000">//</span>
				<span style="COLOR: #008000">以上程序在vs2005+win2003下编译运行通过。</span>
		</div>
<img src ="http://www.cppblog.com/Tauruser/aggbug/7796.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/Tauruser/" target="_blank">Tauruser</a> 2006-05-29 09:25 <a href="http://www.cppblog.com/Tauruser/archive/2006/05/29/7796.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>