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

ΧÆå´òÆ×Èí¼þÖÐ×Ô¶¯Ìá×Ó¹¦ÄܵÄʵÏÖ£¬C/C++Ô´Âë

±¾ÎÄÊ×·¢µØÖ·£ºhttp://blog.csdn.net/liigo/archive/2009/09/22/4582018.aspx
תÔØÇë×¢Ã÷³ö´¦£ºhttp://blog.csdn.net/liigo
×÷Õߣºliigo, 2009/09/22
¡¡¡¡ÔÚÏÂΧÆåʱ£¬µ±Ò»¸öÆå×ÓÂäµ½ÆåÅÌÉÏ£¬Ëü»á¶ÔÖÜΧ¶Ô·½Æå×ÓµÄËÀ»î²úÉúÓ°Ï죬Èç¹û¶Ô·½Æå×ÓûÓÐÆøÁË£¨ËÀÁË£©£¬±ØÐë´ÓÆåÅÌÉÏÄõô£¨Ìá×Ó£©¡£Õâ¸ö¹ý³ÌÌåÏÖµ½Î§ÆåÈí¼þÖУ¬¾ÍÐèҪͨ¹ý³ÌÐò´úÂëÅжÏijһ¸öÆå×Ó»òijһƬÆå×ÓµÄËÀ»î״̬£¬½ø¶ø°ÑËÀµôµÄÆå×Ó´ÓÆåÅÌÉÏÒƳý¡£
¡¡¡¡½øÒ»²½·ÖÎöµÄ»°£¬¸ÕÂäϵÄÆå×Ó£¬Ö»¿ÉÄÜÍþвµ½ÖÜΧÓëÆä½ôÁÙµÄÉÏÏÂ×óÓÒ·½ÏòµÄËĸö¶Ô·½Æå×Ó£¨Ò²¿ÉÄÜÊÇÈý¸ö»òÁ½¸ö£¬ÈçÔڱ߽ǵĻ°£©£¬¶øÕâËĸö·½ÏòÉϵĶԷ½Æå×Ó£¬¿ÉÄÜÊǹÂÁ¢µÄÒ»¸öÆå×Ó£¬Ò²¿ÉÄÜÊǶà¸öÆå×ÓÏàÁ¬µÄһƬÆå×Ó£¨Ò»¿éÆ壩¡£ÒªÅжÏÒ»¿éÆåÊÇ·ñ»¹»î×Å£¬ÐèÒªÖð¸ö¼ì²éÕâ¿éÆåÖеÄÿһ¸öÆå×Ó£ºÈç¹ûÆäÖÐij¸öÆå×ÓÅÔ±ßûÓÐÆå×Ó£¬ËµÃ÷Õâ¿éÆåÖÁÉÙ»¹ÓÐÒ»¿ÚÆø£¬Òò¶øÈ·¶¨Ëü»¹Ã»ÓÐËÀ£»Èç¹û¼ì²éÍêÕâ¿éÆåÖеÄËùÓÐÆå×Ó£¬Ê¼ÖÕ²»ÄÜÕÒµ½Ò»¿ÚÆø£¬¿ÉÒÔÈ·¶¨ÕâÕû¿éÆ嶼ËÀµôÁË¡£¿´ÉÏÈ¥ÕâÊÇÒ»¸öÐèÒª²ÉÓõݹ鴦ÀíµÄÇé¿ö¡£µÝ¹é´¦ÀíÕû¿éÆåʱ£¬ÇмÇÐèÒª¼Ç¼ÒѾ­´¦Àí¹ýµÄÆå×Ó£¬²»ÄÜÖظ´´¦Àíͬһ¸öÆå×Ó£¬·ñÔò¿ÉÄܻᵼÖÂÑ­»·µÝ¹é¡¢ËÀµÝ¹éµÄÇé¿ö·¢Éú¡£Ò»µ©È·¶¨ÁËÆå×ÓµÄÉúËÀ£¬´ÓÆåÅÌÉÏÄõôËüÊǺÜÈÝÒ×µÄÊÂÇ飬ֻÊÇÔÚ³ÌÐòÖÐ×öһЩ±ê¼Ç¶øÒÑ¡£
¡¡¡¡×¢Ò⣬ÎÒ£¨liigo£©ÕâÀï˵µÄij¿éÆå“»¹»î×Å”£¬²¢²»µÈͬÓÚΧÆåÊõÓïÖеēÒÑ×ö»î”£¬¶øÖ»ÊDZíʾÕâ¿éÆå“ÔÝʱ»¹Ã»ÓÐËÀ”£¬ÖÁÓÚ½«À´»á²»»áËÀ£¬²»ÔÚÏÖÔڵĴ¦Àí·¶Î§Ö®ÄÚ¡£±ðÍüÁË£¬ÎÒÃǵÄÄ¿±êÊÇ“Èç¹ûÆå×ÓËÀÁË£¬°ÑËü´ÓÆåÅÌÉÏÄõô”£¬¼ÈÈ»»¹Ã»ËÀ£¨»òûËÀ¾ø£©£¬ÓֺαعÜËüÄØ£¨Èç¹û·ÇÒªÌáÇ°Ìá×Ó£¬·´¶øÎ¥·´Î§Æå¹æÔòÁË£©¡£
¡¡¡¡ÒÔÏÂC/C++Ô´´úÂ룬ʵÏÖÁËÉÏÃæ˵µ½µÄ×Ô¶¯Ìá×Ó¹¦ÄÜ¡£
//´¦Àí¸ÕÂäϵÄ×Ó¶ÔÖܱ߶Է½×ÓµÄËÀ»îÓ°Ïì
void processLiving(int row, int col)
{
StoneColor color = m_board[row-1][col-1];
assert(color != SC_BLANK);
StoneColor otherColor = (color == SC_BLACK ? SC_WHITE : SC_BLACK);
if(m_killedStones[m_stoneIndex] == NULL)
m_killedStones[m_stoneIndex] = new BufferedMem(20);
BufferedMem* pKilledStones = m_killedStones[m_stoneIndex];
pKilledStones->Empty();
//Èç¹ûÖܱßÊǶԷ½µÄ×Ó, Ôò¼ì²éÆäËÀ»îÇé¿ö, ËÀÁ˵ÄÄõô
BufferedMem stoneIndexList;
if(row>1 && m_board[row-1-1][col-1]==otherColor && checkL


Ïà¹ØÎĵµ£º

¶¨ÒåC/C++È«¾Ö±äÁ¿/³£Á¿¼¸ÖÖ·½·¨µÄÇø±ð

ÔÚÌÖÂÛÈ«¾Ö±äÁ¿Ö®Ç°ÎÒÃÇÏÈÒªÃ÷°×¼¸¸ö»ù±¾µÄ¸ÅÄ
 
1. ±àÒëµ¥Ôª(Ä£¿é)£º
    ÔÚIDE¿ª·¢¹¤¾ß´óÐÐÆäµÀµÄ½ñÌ죬¶ÔÓÚ±àÒëµÄһЩ¸ÅÄîºÜ¶àÈËÒѾ­²»ÔÙÇå³þÁË£¬ºÜ¶à³ÌÐòÔ±×îŵľÍÊÇ´¦ÀíÁ¬½Ó´íÎó(LINK ERROR), ÒòΪËü²»Ïñ±àÒë´íÎóÄÇÑù¿ÉÒÔ¸ø³öÄã³ÌÐò´íÎóµÄ¾ßÌåλÖã¬Äã³£³£¶ÔÕâÖÖ´íÎó¸Ðµ½°ÃÄÕ£¬µ«ÊÇÈç¹ûÄã¾ ......

¹ØÓÚdelete C/C++ Ö¸Õë

Õ»£ºº¯Êýµ÷ÓõÄʱºò£¬ÔÚÕ»Öб£´æ¾Ö²¿±äÁ¿ºÍº¯Êý²ÎÊýµÈ¡£µ±º¯Êý·µ»Øʱ£¬×Ô¶¯Çå³ýÕ»¡£
×ÔÓÉ´æ´¢Çø£ºÒ²³ÆΪ¶Ñ(heap)£¬¿ÉÒÔ¿´×÷´óÁ¿µÄÄÚ´æ¶Î¡£Í¨¹ý new ²Ù×÷·û·ÖÅäµÄÄÚ´æÔÚ¶ÑÖС£³ÌÐò½áÊø֮ǰ²»×Ô¶¯Çå³ý×ÔÓÉ´æ´¢Çø¡£ÐèÒªÓɳÌÐòÀ´¸ºÔðÊÍ·Å£¨delete£©¡£
1.
¶ÔÖ¸ÏòÕ»ÉÏÄÚ´æµÄÖ¸Õëµ÷ÓÃdelete»áµ¼Ö³ÌÐòCrash¡£
2. 
new ½ø ......

Ö±½ÓÑ¡ÔñÅÅÐò C´úÂë

void StraightSelectionSort(int array[], unsigned int n)
{
/*
×¢£º¹Ø¼ü×ÖÖµÀàÐÍΪint£¬Êý×éµÄË÷ÒýÊÇ´Ó0¿ªÊ¼
1. ³õʼ״̬ÎÞÐòÇøΪarray¡¾0£¬ n - 1¡¿£¬ÓÐÐòÇøΪ¿Õ¡£
2. µÚ1ÌËÅÅÐò´Óarray¡¾0£¬ n - 1¡¿ÖÐÕÒµ½Ï±êΪkµÄ¹Ø¼ü×Ö×îСֵ£¬°Ñarray¡¾k¡¿ºÍ
array¡¾0¡¿½»»»¡£ÏÖÔÚÎÞÐòÇøΪarray¡¾1£¬ n - 1¡¿£¬ ÓÐÐòÇø ......

MATLABÓëC/C++»ìºÏ±à³ÌÖ®MATLABµ÷ÓÃC³ÌÐò

ͨ¹ý°ÑºÄʱ³¤µÄº¯ÊýÓÃcÓïÑÔʵÏÖ£¬²¢±àÒë³Émexº¯Êý¿ÉÒÔ¼Ó¿ìÖ´ÐÐËٶȡ£Matlab±¾ÉíÊDz»´øcÓïÑԵıàÒëÆ÷µÄ£¬ËùÒÔÒªÇóÄãµÄ»úÆ÷ÉÏÒѾ­°²×°ÓÐVC,BC»òWatcom CÖеÄÒ»ÖÖ¡£Èç¹ûÄãÔÚ°²×°MatlabʱÒѾ­ÉèÖùý±àÒëÆ÷£¬ÄÇôÏÖÔÚÄãÓ¦¸Ã¾Í¿ÉÒÔʹÓÃmexÃüÁîÀ´±àÒëcÓïÑԵijÌÐòÁË¡£Èç¹ûµ±Ê±Ã»ÓÐÑ¡£¬¾ÍÔÚMatlabÀï¼üÈëmex -setup£¬ÏÂÃæÖ»Òª¸ù¾ÝÌáʾ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ