Programming °æ (¾«»ªÇø)
·¢ÐÅÈË: flamingsnow (ÄãÔÚËûÏ绹ºÃÂð£¿), ÐÅÇø: Programming
±ê Ìâ: Re: ÒýÓõ½µ×ÊDz»ÊÇÖ¸Õ룿
·¢ÐÅÕ¾: ¹þ¹¤´ó×϶¡Ïã (2002Äê02ÔÂ28ÈÕ20:25:22 ÐÇÆÚËÄ), Õ¾ÄÚÐżþ
ÒýÓÃÏ൱ÓÚ¾ä±ú¡
¡¾ ÔÚ Roe (Roe) µÄ´ó×÷ÖÐÌáµ½: ¡¿
: ÄÃÒÔϵijÌÐòÀ´Ëµ,swapº¯Êý¶¨ÒåÁËÁ½¸öÕûÐÎÒýÓÃ,µ±µ÷ÓÃswapº¯Êýʱ,&ÓÃÓÚ´«µÝ²ÎÊý
: ֮ǰ,ָʾ±àÒë³ÌÐò½«²ÎÊýµÄµØÖ·´«µÝ¸øswapµÄÁ½¸öÕûÐÎÒýÓÃ,ÄÇÕâÀïµÄa,bÊÇ·ñÓëi,
: j¹²ÓÃÁËͬһ¿é¶ùÄÚ´æ?
: #include <stdio.h>
: main()
: {
: extern void swap(int &a, int &b);
: int i = 7, j = -3;
: swap(i, j);
: printf("The value of i = %d j = %d", i, j);
: }
--
¡ù À´Ô´:¡¤¹þ¹¤´ó×϶¡Ïã bbs.hit.edu.cn¡¤[FROM: FTCL.hit.edu.cn]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
Ò³ÃæÖ´ÐÐʱ¼ä£º3.216ºÁÃë