﻿<?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++博客-Only C/C++-随笔分类-Tools</title><link>http://www.cppblog.com/cc/category/582.html</link><description>半亩方塘 天光云影</description><language>zh-cn</language><lastBuildDate>Mon, 19 May 2008 12:57:30 GMT</lastBuildDate><pubDate>Mon, 19 May 2008 12:57:30 GMT</pubDate><ttl>60</ttl><item><title>孙鑫VC视频教学笔记20课</title><link>http://www.cppblog.com/cc/archive/2007/05/29/25092.html</link><dc:creator>JetSun</dc:creator><author>JetSun</author><pubDate>Tue, 29 May 2007 10:48:00 GMT</pubDate><guid>http://www.cppblog.com/cc/archive/2007/05/29/25092.html</guid><wfw:comment>http://www.cppblog.com/cc/comments/25092.html</wfw:comment><comments>http://www.cppblog.com/cc/archive/2007/05/29/25092.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cppblog.com/cc/comments/commentRss/25092.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/cc/services/trackbacks/25092.html</trackback:ping><description><![CDATA[<h2 align=center>孙鑫VC视频教学笔记20课<br></h2>
<p style="COLOR: #000000">&nbsp;&nbsp;&nbsp;孙鑫老师的VC教学的视频在网上非常流行，我刚好看到网上有这个视频的学习笔记，这里把它贡献出来与大家分享。<br>下载<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a title=孙鑫VC视频教学笔记 href="http://www.cppblog.com/Files/cc/vc_sx.zip">孙鑫VC视频教学笔记</a></p>
<img height=531 alt="" src="http://www.cppblog.com/images/cppblog_com/cc/2007_5/spbj.jpg" width=670 border=0><br><br><br><br><br><img src ="http://www.cppblog.com/cc/aggbug/25092.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/cc/" target="_blank">JetSun</a> 2007-05-29 18:48 <a href="http://www.cppblog.com/cc/archive/2007/05/29/25092.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>在Dev C++中配置ARM交叉编译环境</title><link>http://www.cppblog.com/cc/archive/2006/02/23/3440.html</link><dc:creator>JetSun</dc:creator><author>JetSun</author><pubDate>Thu, 23 Feb 2006 06:28:00 GMT</pubDate><guid>http://www.cppblog.com/cc/archive/2006/02/23/3440.html</guid><wfw:comment>http://www.cppblog.com/cc/comments/3440.html</wfw:comment><comments>http://www.cppblog.com/cc/archive/2006/02/23/3440.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cppblog.com/cc/comments/commentRss/3440.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/cc/services/trackbacks/3440.html</trackback:ping><description><![CDATA[
		<p align="center">在Dev C++中配置ARM交叉编译环境<br /></p>
		<p align="left">       很多人都使用C/C++进行嵌入式开发，但是很多都是在Linux这样的系统下进行的开发，很多人对linux的环境还不是很熟悉，所以我在这里要介绍的是在Windows环境下采用DevC++进行ARM交叉编译环境的设置。<br /><br />    待续。<br /><br />  本来想把文档翻译的，但是没有时间，所以干脆直接挂上来，大家看看文档把。<br />   <br /> <a class="" title="" href="/Files/cc/SetDevCPPArm.rar" target="">   下载</a></p>
<img src ="http://www.cppblog.com/cc/aggbug/3440.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/cc/" target="_blank">JetSun</a> 2006-02-23 14:28 <a href="http://www.cppblog.com/cc/archive/2006/02/23/3440.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Dev-c++和VC2005中编译同一个程序出现的问题</title><link>http://www.cppblog.com/cc/archive/2005/12/30/2292.html</link><dc:creator>JetSun</dc:creator><author>JetSun</author><pubDate>Fri, 30 Dec 2005 10:22:00 GMT</pubDate><guid>http://www.cppblog.com/cc/archive/2005/12/30/2292.html</guid><wfw:comment>http://www.cppblog.com/cc/comments/2292.html</wfw:comment><comments>http://www.cppblog.com/cc/archive/2005/12/30/2292.html#Feedback</comments><slash:comments>5</slash:comments><wfw:commentRss>http://www.cppblog.com/cc/comments/commentRss/2292.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/cc/services/trackbacks/2292.html</trackback:ping><description><![CDATA[<H3 align=center><FONT color=#000000>Dev-c++和VC2005中编译同一个程序出现的问题<BR></FONT></H3>
<P><FONT color=#000000></FONT>
<P><FONT color=#000000><FONT size=4>&nbsp;&nbsp;&nbsp;有两段程序，其实应该是一段程序，只是稍微有点不同。程序<BR><BR>的主要目的很简单，就是要输出1－25的平方根和平方。</FONT><BR><BR>&nbsp;&nbsp;&nbsp;第一段在Dev-C++中编译通过的，就叫程序一：</FONT></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"><SPAN style="COLOR: #008080">&nbsp;1</SPAN><IMG src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #000000">#include&nbsp;</SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">iostream</SPAN><SPAN style="COLOR: #000000">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;2</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align=top>#include&nbsp;</SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">math.h</SPAN><SPAN style="COLOR: #000000">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;3</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">using</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">namespace</SPAN><SPAN style="COLOR: #000000">&nbsp;std;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;4</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_69_200_Open_Image onclick="this.style.display='none'; Codehighlighter1_69_200_Open_Text.style.display='none'; Codehighlighter1_69_200_Closed_Image.style.display='inline'; Codehighlighter1_69_200_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_69_200_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_69_200_Closed_Text.style.display='none'; Codehighlighter1_69_200_Open_Image.style.display='inline'; Codehighlighter1_69_200_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">&nbsp;main()</SPAN><SPAN id=Codehighlighter1_69_200_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_69_200_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;5</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;cout</SPAN><SPAN style="COLOR: #000000">&lt;&lt;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">N&nbsp;&nbsp;&nbsp;&nbsp;平方根&nbsp;&nbsp;&nbsp;&nbsp;平方</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&lt;&lt;</SPAN><SPAN style="COLOR: #000000">endl;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;6</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_119_173_Open_Image onclick="this.style.display='none'; Codehighlighter1_119_173_Open_Text.style.display='none'; Codehighlighter1_119_173_Closed_Image.style.display='inline'; Codehighlighter1_119_173_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_119_173_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_119_173_Closed_Text.style.display='none'; Codehighlighter1_119_173_Open_Image.style.display='inline'; Codehighlighter1_119_173_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">for</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;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">25</SPAN><SPAN style="COLOR: #000000">;i</SPAN><SPAN style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">)</SPAN><SPAN id=Codehighlighter1_119_173_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_119_173_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;7</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cout</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">\t</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&lt;&lt;</SPAN><SPAN style="COLOR: #000000">sqrt(i)</SPAN><SPAN style="COLOR: #000000">&lt;&lt;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">\t</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&lt;&lt;</SPAN><SPAN style="COLOR: #000000">pow(i,</SPAN><SPAN style="COLOR: #000000">2</SPAN><SPAN style="COLOR: #000000">)</SPAN><SPAN style="COLOR: #000000">&lt;&lt;</SPAN><SPAN style="COLOR: #000000">endl;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;8</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;9</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;getchar();<BR></SPAN><SPAN style="COLOR: #008080">10</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080">11</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">12</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align=top></SPAN></DIV><BR>&nbsp;&nbsp;<FONT color=#000000>&nbsp;第二段在VC2005中编译通过的，就叫程序二：</FONT><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"><SPAN style="COLOR: #008080">&nbsp;1</SPAN><IMG src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #000000">#include&nbsp;</SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">iostream</SPAN><SPAN style="COLOR: #000000">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;2</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align=top>#include&nbsp;</SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">math.h</SPAN><SPAN style="COLOR: #000000">&gt;</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;3</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">using</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">namespace</SPAN><SPAN style="COLOR: #000000">&nbsp;std;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;4</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_69_220_Open_Image onclick="this.style.display='none'; Codehighlighter1_69_220_Open_Text.style.display='none'; Codehighlighter1_69_220_Closed_Image.style.display='inline'; Codehighlighter1_69_220_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_69_220_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_69_220_Closed_Text.style.display='none'; Codehighlighter1_69_220_Open_Image.style.display='inline'; Codehighlighter1_69_220_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">&nbsp;main()</SPAN><SPAN id=Codehighlighter1_69_220_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_69_220_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;5</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;cout</SPAN><SPAN style="COLOR: #000000">&lt;&lt;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">N&nbsp;&nbsp;&nbsp;&nbsp;平方根&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;平方</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&lt;&lt;</SPAN><SPAN style="COLOR: #000000">endl;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;6</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_120_193_Open_Image onclick="this.style.display='none'; Codehighlighter1_120_193_Open_Text.style.display='none'; Codehighlighter1_120_193_Closed_Image.style.display='inline'; Codehighlighter1_120_193_Closed_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_120_193_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_120_193_Closed_Text.style.display='none'; Codehighlighter1_120_193_Open_Image.style.display='inline'; Codehighlighter1_120_193_Open_Text.style.display='inline';" src="http://www.cppblog.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">for</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;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">25</SPAN><SPAN style="COLOR: #000000">;i</SPAN><SPAN style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">)</SPAN><SPAN id=Codehighlighter1_120_193_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_120_193_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;7</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cout</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">\t</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&lt;&lt;</SPAN><SPAN style="COLOR: #000000">sqrt((</SPAN><SPAN style="COLOR: #0000ff">double</SPAN><SPAN style="COLOR: #000000">)i)</SPAN><SPAN style="COLOR: #000000">&lt;&lt;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">\t\t</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&lt;&lt;</SPAN><SPAN style="COLOR: #000000">pow((</SPAN><SPAN style="COLOR: #0000ff">double</SPAN><SPAN style="COLOR: #000000">)i,</SPAN><SPAN style="COLOR: #000000">2</SPAN><SPAN style="COLOR: #000000">)</SPAN><SPAN style="COLOR: #000000">&lt;&lt;</SPAN><SPAN style="COLOR: #000000">endl;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;8</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.cppblog.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;9</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;getchar();<BR></SPAN><SPAN style="COLOR: #008080">10</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.cppblog.com/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080">11</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.cppblog.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">12</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.cppblog.com/images/OutliningIndicators/None.gif" align=top></SPAN></DIV>&nbsp;<FONT color=#000000>&nbsp;&nbsp;两段程序的主要区别就是sqrt和pow函数中的参数类型。<BR><BR>&nbsp;</FONT><FONT color=#000000><STRONG>&nbsp;&nbsp;现象：<BR></STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;程序一在Dev-C++中可以轻易编译通过，程序二在Dev-C++中也可以轻易编译通过。<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;程序一在VC2005中无法编译通过，程序二是可以的，程序一在VC2005中编译的时候会提示以下错误。<BR>&nbsp;&nbsp; <STRONG>错误如下：</STRONG><BR></FONT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT color=#0000ff>Error&nbsp;1&nbsp;error C2668: 'sqrt' : ambiguous call to overloaded function&nbsp;e:\C\vc2005\2\p7\p7\3.cpp&nbsp;7<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Error&nbsp;2&nbsp;error C2668: 'pow' : ambiguous call to overloaded function&nbsp;e:\C\vc2005\2\p7\p7\3.cpp&nbsp;7<BR><BR>&nbsp;&nbsp;&nbsp;</FONT><FONT color=#000000> </FONT><FONT color=#000000><STRONG>在Dev-C++中的math.h中，这两个数学函数的原型是<BR></STRONG>_CRTIMP&nbsp;double __cdecl pow (double, double);<BR>_CRTIMP double __cdecl sqrt (double);<BR>&nbsp;<BR>&nbsp;&nbsp;&nbsp; <STRONG>在VC2005中的math.h中，这两个数学函数的原型是</STRONG><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;double&nbsp; __cdecl pow<FONT color=#0000ff>(__in</FONT> double _X, <FONT color=#0000ff>__in</FONT> double _Y);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; double&nbsp; __cdecl sqrt (<FONT color=#0000ff>(__in </FONT>double _X);<BR><BR>&nbsp;其中多出来的<FONT color=#0000ff>__in</FONT>的介绍如下：<BR>&nbsp;If you examine the library header files, you will notice some unusual annotations such as <B><FONT style="BACKGROUND-COLOR: #f5f5dc">__in_</FONT>z</B> and <B>__out_ecount_part</B>. These are examples of Microsoft's standard source code annotation language (SAL), which provides a set of annotations to describe how a function uses its parameters—the assumptions it makes about them, and the guarantees it makes upon finishing. The header file &lt;sal.h&gt; defines the annotations.<BR>具体的可以看</FONT><A href="http://msdn2.microsoft.com/en-us/library/ms235402.aspx"><FONT color=#000000>http://msdn2.microsoft.com/en-us/library/ms235402.aspx</FONT></A><BR><BR><BR><FONT color=#000000>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;函数的原型都是差不多的，参数类型也是一样。int类型赋值给double应该是没有问题的，会进行隐式转换，不知道VC2005怎么不行？一直都听说Dev-C++对C++的标准支持的很不错，微软的最新的C++开发工具在支持C++标准方面也取得了突飞猛进的进步，现在一个程序，在不同地方却不能同时编译通过，我不知道是不是哪个对标准的支持有什么问题，还是编译器提供的安全性不同的原因呢？疑惑ing。<BR></FONT>&nbsp;&nbsp;&nbsp;&nbsp; <img src ="http://www.cppblog.com/cc/aggbug/2292.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/cc/" target="_blank">JetSun</a> 2005-12-30 18:22 <a href="http://www.cppblog.com/cc/archive/2005/12/30/2292.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>