﻿<?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++博客-探险C++帝国</title><link>http://www.cppblog.com/jiang52han/</link><description>C++</description><language>zh-cn</language><lastBuildDate>Mon, 13 Apr 2026 01:59:13 GMT</lastBuildDate><pubDate>Mon, 13 Apr 2026 01:59:13 GMT</pubDate><ttl>60</ttl><item><title>开始有点理解自定义函数位置任意性</title><link>http://www.cppblog.com/jiang52han/archive/2008/03/31/45843.html</link><dc:creator>江一寒</dc:creator><author>江一寒</author><pubDate>Mon, 31 Mar 2008 14:07:00 GMT</pubDate><guid>http://www.cppblog.com/jiang52han/archive/2008/03/31/45843.html</guid><wfw:comment>http://www.cppblog.com/jiang52han/comments/45843.html</wfw:comment><comments>http://www.cppblog.com/jiang52han/archive/2008/03/31/45843.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cppblog.com/jiang52han/comments/commentRss/45843.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/jiang52han/services/trackbacks/45843.html</trackback:ping><description><![CDATA[<p>一直对函数位置的任意性比较陌生,今天偶得理解一点. 也算小点进步吧<br><br>/***************************************<br>program:show the character of global variabel<br>programmer:god girl<br>environment:winxp/vc++<br>***************************************/<br>#include"stdio.h"<br>int fun1(void);<br>int fun2(void);<br>int fun3(void);<br>int x;<br>main()<br>{<br>&nbsp; x=10;<br>&nbsp; printf("x=%d\n",x);<br>&nbsp; printf("x=%d\n",fun1());<br>&nbsp; printf("x=%d\n",fun2());<br>&nbsp; printf("x=%d\n",fun3());<br>}<br>&nbsp;<br>fun1(void)<br>{<br>&nbsp; x=x+10;<br>}</p>
<p>int fun2(void)<br>{<br>&nbsp; int x;<br>&nbsp; x=1;<br>&nbsp; return(x);<br>}</p>
<p>fun3(void)<br>{<br>&nbsp; x=x+10;<br>}<br>/***************************************<br>Summary:从这个程序里终于理解&#8216;自定义函数&#8217;的位置自由性。即&#8216;自定义函数&#8217;与所在的位置<br>没有关联性，它即可以放在'main函数'之前亦可以在后<br>***************************************/</p>
<img src ="http://www.cppblog.com/jiang52han/aggbug/45843.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/jiang52han/" target="_blank">江一寒</a> 2008-03-31 22:07 <a href="http://www.cppblog.com/jiang52han/archive/2008/03/31/45843.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>