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

dz̸CÓëC++µÄÉè¼ÆÓë±à³Ì·ç¸ñ£¨Ò»£©

Ò»Ö±ÏëдһЩ±È½ÏCºÍC++Éè¼ÆÓë±à³Ì·ç¸ñµÄÎÄ×Ö£¬ÕýºÃ½üÀ´¹¤×÷ÈÎÎñ²»¶à£¬Äܹ»ÓÐʱ¼äÖØÐÂÕûÀíÒ»ÏÂ×Ô¼ºËùѧµÄ¶«¶«£¬ÓÚÊDZã¾ö¶¨¿ªÊ¼Ð´Õâ¸öÌâÄ¿£¬¶øÄ¿µÄ½ö½öÖ»ÊÇ´òËãÄܾÍÕâ¸ö»°ÌâºÍ´ó¼ÒÌÖÂÛÌÖÂÛ£¬Å×שÒýÓñ¡¢Ôö³¤¸öÈ˵ļûʶ¡£
Ê×ÏÈÏë˵Ã÷һϣ¬¸öÈËÊÇC++Éè¼Æ¡¢±à³Ì·ç¸ñµÄ¼á¶¨Óµ»¤Õߣ¬ËùÒÔÎҵĹ۵ãÄÑÃâ´øÓиöÈ˵ÄÆ«ºÃ£¬Èç¹ûÄú²»ÔÞͬ£¬Ò²ÇëÅúÆÀÖ¸Õý¡£ºÃÁË£¬ÑÔ¹éÕý´«£¬¸öÈ˾õµÃCÓëC++Éè¼ÆÓë±à³Ì·ç¸ñ×î±¾ÖʵIJ»Í¬ÊÇ£ºCÒÔº¯Êý¼äµÄµ÷ÓùØϵΪºËÐÄ£¨ËùÒÔCÓïÑÔ±»³ÆΪÃæÏò¹ý³ÌʽÓïÑÔ£©£¬¶øC++ÒÔ³ÌÐòÔªËØ£¨¶ÔÏ󣩼äµÄ¹ØϵºÍ½á¹¹ÎªºËÐÄ£¨ËùÒÔC++±»³ÆΪÃæÏò¶ÔÏóµÄÓïÑÔ£©——PS£ºÈç¹ûÄúÄõ½Ò»¶Ñ´úÂëºóÊ×ÏÈÈ¥¿´¸÷¸öº¯ÊýµÄʵÏÖ£¬²¢ÊÔͼŪ¶®ËüÃÇÊÇÈçºÎÏ໥µ÷Óõģ¬ÄÇÖ¤Ã÷ÄúÊÇһλµäÐ͵ÄC³ÌÐòÔ±£»¶øÈç¹ûÄúÊ×ÏÈÊÇÈ¥²é¿´ËùÓÐÍ·Îļþ£¬²¢ÊÔͼ¸ã¶®Ã¿¸öÀàÖ®¼äµÄ¹Øϵ£¬ÄÇÖ¤Ã÷ÄúÊÇһλµäÐ͵ÄC++³ÌÐòÔ±¡£
¾Ù¸ö¼òµ¥µÄÀý×Ó£¬¶ÔÓÚÒ»ÃûC³ÌÐòÔ±£¬µ±ËûÐèҪʵÏÖijÖÖ״̬»úʱ£¬Í¨³£ÊÇʹÓÃÏÂÃæÕâÑùµÄ´úÂ룺
if (0 == CheckState(...) ) // ÅжÏij¸öº¯ÊýµÄ·µ»ØÖµÊÇ·ñΪ0
    DoSomething(...); // µ÷ÓÃij¸öº¯Êý
else
    DoSomethingElse(...); // µ÷Óô¦ÀíÆäËüÇé¿öµÄÁíÒ»¸öº¯Êý
»òÊÇÕâÑù£º
switch( CheckState(...) ) // ¸ù¾Ýij¸öº¯ÊýµÄ·µ»ØÖµ×ö²»Í¬µÄ¶¯×÷
{
case 0:
    DoSomething1(...);
    break;
case 1:
    DoSomething2(...);
    break;
case -1:
    DoSomething3(...);
    break;
default:
    DoSomethingElse(...);
}
£¨PS£ºÒÔÉÏÕâЩ´úÂë±ØÈ»ÊÇÔÚÔ´ÎļþµÄij¸öº¯ÊýÖгöÏֵģ¬ÕâÒ²½âÊÍÁËΪʲôC³ÌÐòÔ±×ÜÊÇÏÈ¿´Ô´Îļþ¡££©¶øÒ»¸öC++³ÌÐòÔ±Ôò¿ÉÄܲ»Õâô×ö£¬ÕâÀïC++³ÌÐòÔ±¶àÁËÒ»ÖÖÑ¡Ôñ——ʹÓÃÐ麯Êý£º
//ÉêÃ÷Ò»¸ö½Ó¿Ú
struct IStateMachine
{
virtual void DoSomething(...) = 0;
};
// Õë¶Ô״̬0Ìṩһ¸öʵÏÖÀà
struct CDoSomethingForState0: IStateMachine
{
virtual void DoSomething(...);
}
// Õë¶Ô״̬1Ìṩһ¸öʵÏÖÀà
struct CDoSomethingForState1: IStateMachine
{
virtual void DoSomething(...);
};
// Õë¶ÔÆäËü״̬Ìṩһ¸öʵÏÖÀà
struct CDoSomethingForOhterStates: IStateMachine
{
virtual void DoSomething(...);
};
// ʹÓÃÒ»¸ö¹¤³§º¯ÊýÀ´·µ»ØÌض¨µÄʵÏÖ¶ÔÏó
IStateMachine * CheckState(...);
//


Ïà¹ØÎĵµ£º

ÓÃCдµÄ3DÃÔ¹¬

          Boss˵£¬Òª¿´OpenGL£¬¿´ÁË¿ìÒ»¸öÔ£¬×ÜËã³öÁ˸öÏñÑùµÄ¶«Î÷£¬ÓÃCдÁ˸ö3DÃÔ¹¬£¬
ËäȻֻÓÐ350ÐÐ
       ´úÂ룬²»¹ý±ßѧ±ßд£¬×ã×ãдÁËÒ»ÖÜʱ¼ä£¬»¹ÊÇСÓгɾ͸еģ¬»î»î»î£¡
         &n ......

XML ½âÎöc++Ô´Â루ԴÎļþ£©

/*
 * XMLTool.cpp ÅäÖÃÎļþ½âÎö¶¯Ì¬¿â×ÊÔ´Îļþ
 *  Ö÷ÒªÊä³öº¯Êý½Ó¿Ú·Ö±ðʵÏÖ¶ÔÅäÖÃÎļþµÄ¶ÁÈ¡ºÍдÈ룬Õë¶Ô½á¹û¼¯µÄ¸´ÖÆÇå¿Õ£¬ºÍÁ½¸ö×Ö·û´®´¦Àíº¯Êý
 *  ¶ÁÈ¡ÅäÖÃÎļþ½Ó¿Ú £ºint ReadXMLFile(XML_Node_Vector *XmlNodeVector, string filepath);
 *  Ð´È ......

C++Öд¦ÀíXMLÎļþ

дUnmanaged CodeÔÚ.NETʱ´ú³ÉΪһÖֺܱ¯²ÒµÄÊ£¬µ±ÄãÐèÒª´¦ÀíXMLÎļþʱ£¬ÕâÖָоõ»á±äµÃÓÈÆäÇ¿ÁÒ¡£FCLÖеÄSystem.XML¶à¼òµ¥°¡£¬Á¬Steve Ballmer¶¼ÖªµÀÔõôÓá£
ÊÂÇé²»»á×ÜÊÇÄÇôÀíÏëµÄ£¬¼ÙÈçÄãÒªÔÚC/C++³ÌÐòÀï´¦ÀíXMLÔõô°ìÄØ£¿
Ñ¡ÔñÒ»£ºÊÐÃæÉϵÄXML lib»¹ÊÇÓм¸¸öµÄ£¬×îÓÐÃûµÄµ±È»ÊÇlibXML¡£ÎÒÒ»ÄêÇ°Óùý£¬ºÜ²»´í£¬ÎÒ»¹ ......

¡¾C/C++¡¿ÍƼöµÄC++Êé¼®ÒÔ¼°ÔĶÁ˳Ðò


µ±¶ÁÕßÓÐÒ»¶¨c/c++»ù´¡
ÍƼöµÄÔĶÁ˳Ðò:
level 1
´Ó<<essential c++>>¿ªÊ¼£¬¶ÌС¾«º·£¬¿ÉÒÔ¶Ôc++ÄܽøÒ»²½Á˽âÆäÌØÐÔ
ÒÔ<<c++ primer>>×÷×ÖµäºÍ¿ÎÍâ¶ÁÎÒòΪ̫ºñ²»¿ÉÄÜÒ»¿ÚÆø¿´Íê
level 2
È»ºó´Ó<<effective c++>>¿ªÊ¼×ªÖ°£¬ÕâÊÇÊ¥¾­£¬Çë×ñÊØ10½ë£¬Òª¾­³£¿´£¬Ã»Ê¾ÍÄÃÀ´·­·­ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ