Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

C/C++º¯Êý²ÎÊý,´«ÖµÓò´«Ö·!!!

/*
* File: main.cpp
* Author: Vicky
*
* Created on 2010Äê5ÔÂ8ÈÕ, ÏÂÎç2:47
*/
#include <iostream>
using namespace std;
void swap(int x, int y) {
cout << "x and y swap before : " << x << "\t" << y << endl;
int i = x;
x = y;
y = i;
cout << "x and y swap after : " << x << "\t" << y << endl;
}
void swap2(int * x, int * y) {
cout << "x and y swap before : " << *x << "\t" << *y << endl;
int * i = x;
x = y;
y = i;
cout << "x and y swap after : " << *x << "\t" << *y << endl;
}
/**
* ×¢Òâ,´Ë´¦·Ç&xÓë&y²¢·ÇµØÖ·,¶øÊǶÔÏóµÄ±ðÃû!!!
*/
void swap3(int &x, int &y) {
cout << "x and y swap before : " << x << "\t" << y << endl;
int i = x;
x = y;
y = i;
cout << "x and y swap after : " << x << "\t" << y << endl;
}
/**
* °´Ö·´«µÝ,´«µÝµÄ²ÎÊýÊǵØÖ·.
*/
void swap4(int * x, int * y) {
cout << "x and y swap before : " << *x << "\t" << *y << endl;
int i = *x;
*x = *y;
*y = i;
cout << "x and y swap after : " << *x << "\t" << *y << endl;
}
int main(int argc, char** argv) {
int x = 1;
int y = 9;
cout << "main function swap before : " << x << "\t" << y << endl;
swap(x, y);
cout << "main function swap after : " << x << "\t" << y << endl;
// ¿É½«,Ö÷º¯ÊýµÄxÓëy²¢Ã»Óн»»»,±íʾswapº¯Êý½»»»µÄ½ö½öÊÇxÓëyµÄ¸±±¾
cout << "---------" << endl;
int * px = new int(1);
int * py = new int(9);
cout << "main function swap before : " << *px << "\t" << *py << endl;
swap2(px, py);
cout << "main function swap after : " << *px << "\t" << *py << en


Ïà¹ØÎĵµ£º

SD¿¨µÄдÎļþ ÒÔ¼° CÖÐ#·ûºÅ

Ò»  Ê×ÏÈ×ܽáÒ»ÏÂSD¿¨µÄдÎļþ£¬Ðè×¢ÒâµÄÊÂÏîÈçÏ£º
1. FAT16 дµÄʱºò±ØÐëÖÁÉÙдһ¸öÉÈÇø¡£
2. FAT±í²»ÄÜƵ·±µÄ¶Áд£¬·ñÔò»á³ö´í¡£ÉêÇëеÄÒ»¸ö´Øʱ£¬Ö±½ÓÔÚÕâ¸ö´ØÀïÃ棨¼´ÏÂÒ»´ØºÅ£©µÄдΪ0XFFFF¡£
3. FATËƺõ±ØÐëת»¯³Éu16²ÅÄÜд¡£Ã²ËÆÊÇÕâÑù£¬¾ßÌåû×Ðϸ¿´¡£
4. »ñȡеÄË÷Òý´ØµÄʱºò£¬Ö±½Ó´Ó¾ÉµÄË÷Òý´ØµÄºóÃæ ......

ÉîÈëC/C++Ö®»ùÓÚCheckStackVarsµÄ°²È«¼ì²é£¨VS2008£©

×î½üһֱæ±ÏÒµµÄÏà¹ØÊÂÇ飬¼ÓÉϹ¤×÷£¬×ªÑۼ䣬ÓÖµ½Ôµ×ÁË£¬Ö®Ç°³ÐŵµÄÿÔÂһƪ²©ÎÄ£¬Ç°¼¸Ìì¾ÍÒ»Ö±ÔÚÑ°ÕÒµ½µ×Ҫдʲô£¬½üÁ½ÌìÓÖͻȻ·¢ÏÖÓкܶණÎ÷¿ÉÒÔд¡£±¾Æª¾ÍÏÈÑÓÐø֮ǰµÄһƪ»ùÓÚCookieµÄ°²È«¼ì²é»úÖÆ£¨ÉîÈëC/C++Ö®»ùÓÚCookieµÄ°²È«¼ì²é£¨VS2005£©£©À´½éÉÜÏÂÁíÍâÒ»ÖÖÔÚDEBUG°æ±¾Ïµİ²È«¼ì²é£¬Ò²¾ÍÊÇCheckStackVars¼ì ......

ÓеÀÄÑÌâÁ·Ï°Èü2ÖеÄcÌâ

ÃèÊö ¸ø¶¨Ò»¸öÕûÊýÐòÁУ¬ÅжÏÆäÖÐÓжàÉÙ¸öÊý£¬µÈÓÚÊýÁÐÖÐÆäËûÁ½¸öÊýµÄºÍ¡£ ±ÈÈ磬¶ÔÓÚÊýÁÐ1 2 3 4, Õâ¸öÎÊÌâµÄ´ð°¸¾ÍÊÇ2, ÒòΪ3 = 2 + 1, 4 = 1 + 3¡£ ÊäÈë µÚÒ»ÐÐÊÇÒ»¸öÕûÊýT£¬±íʾһ¹²ÓжàÉÙ×éÊý¾Ý¡£ 1<= T <= 100
½ÓÏÂÀ´µÄÿ×éÊý¾Ý¹²Á½ÐУ¬µÚÒ»ÐÐÊÇÊýÁÐÖÐÊýµÄ¸öÊýn ( 1 <= n <= 100)£¬µÚ¶þÐÐÊÇÓÉn¸öÕûÊý×é³ ......

cºÍjavaÖеĶþ½øÖÆÎļþ


×î½üÐèҪдһ¶Î³ÌÐò£¬Íê³ÉÒÔÏµĹ¤×÷£¬ÓÃjava½«Êý¾ÝÒÔ¶þ½øÖƵÄÐÎʽдÈëÎļþÖУ¬È»ºóÓÃC¶Á³ö´Ë¶þ½øÖÆÎļþ¡£
¿ªÊ¼µÄʱºòûÓп¼ÂÇ»úÆ÷µÄ×Ö½ÚÐò£¬Ö±½Ó¸ã³ösegment fault.ÏëÁ˺ܾ㬲ÅÃ÷°×Ô­À´ÊÇjavaºÍCµÄ×Ö½ÚÐòÊDz»Ò»ÑùµÄ¡£
javaÖеÄ×Ö½ÚÐòÊÇbig endianµÄ£¬ËüÊÇÓë»úÆ÷Î޹صġ£¶øcµÄ×Ö»úÐòÊÇ»úÆ÷Ïà¹ØµÄ£¬¶øµ±Ç°ÓõĻúÆ÷ÊÇx84 ......

C±à³Ì¾«´â

¹æÔò»ò½¨Ò顣ÿÌõ×¼Ôò¶¼ÓÐÀýÍâ
1£¬¼ÙÏëµÄ±àÒë³ÌÐò
ʹÓñàÒë³ÌÐòËùÓеĿÉÑ¡¾¯¸æÉèÊ©
ʹÓÃlintÀ´²é³ö±àÒë³ÌÐò©µôµÄ´íÎó
Èç¹ûÓе¥Ôª²âÊÔ£¬¾Í½øÐе¥Ôª²âÊÔ
2£¬×Ô¼ºÉè¼Æ²¢Ê¹ÓöÏÑÔ
¼ÈҪά»¤³ÌÐòµÄ½»¸¶°æ±¾£¬ÓÖҪά»¤³ÌÐòµÄµ÷ÊÔ°æ±¾
ҪʹÓöÏÑÔ¶Ôº¯Êý²ÎÊý½øÐÐÈ·ÈÏ
Òª´Ó³ÌÐòÖÐɾȥÎÞ¶¨ÒåµÄÌØÐÔ£¬»òÕßÔÚ³ÌÐòÖÐʹÓöÏÑÔÀ´¼ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ