cÖÐÄÚ´æ·ÖÅä&±äÁ¿µÄ´æ´¢Àà±ð
Ò»ÔÚcÖзÖΪÕ⼸¸ö´æ´¢Çø
1.Õ» - ÓɱàÒëÆ÷×Ô¶¯·ÖÅäÊÍ·Å
2.¶Ñ - Ò»°ãÓɳÌÐòÔ±·ÖÅäÊÍ·Å£¬Èô³ÌÐòÔ±²»ÊÍ·Å£¬³ÌÐò½áÊøÊ±¿ÉÄÜÓÉOS»ØÊÕ
3.È«¾ÖÇø£¨¾²Ì¬Çø£©£¬È«¾Ö±äÁ¿ºÍ¾²Ì¬±äÁ¿µÄ´æ´¢ÊÇ·ÅÔÚÒ»¿éµÄ£¬³õʼ»¯µÄÈ«¾Ö±äÁ¿ºÍ¾²Ì¬±äÁ¿ÔÚÒ»¿éÇøÓò£¬Î´³õʼ»¯µÄÈ«¾Ö±äÁ¿ºÍδ³õʼ»¯µÄ¾²Ì¬±äÁ¿ÔÚÏàÁÚµÄÁíÒ»¿éÇøÓò¡£- ³ÌÐò½áÊøÊÍ·Å
4.´æ´¢³£Á¿µÄµØ·½¡£- ³ÌÐò½áÊøÊÍ·Å
ÔÚº¯ÊýÌåÖж¨ÒåµÄ±äÁ¿Í¨³£ÊÇÔÚÕ»ÉÏ£¬ÓÃmalloc, calloc, reallocµÈ·ÖÅäÄÚ´æµÄº¯Êý·ÖÅäµÃµ½µÄ¾ÍÊÇÔÚ¶ÑÉÏ¡£ÔÚËùÓк¯ÊýÌåÍⶨÒåµÄÊÇÈ«¾ÖÁ¿£¬¼ÓÁËstaticÐÞÊηûºó²»¹ÜÔÚÄÄÀï¶¼´æ·ÅÔÚÈ«¾ÖÇø£¨¾²Ì¬Çø£©,ÔÚËùÓк¯ÊýÌåÍⶨÒåµÄstatic±äÁ¿±íʾÔÚ¸ÃÎļþÖÐÓÐЧ£¬²»ÄÜexternµ½±ðµÄÎļþÓã¬ÔÚº¯ÊýÌåÄÚ¶¨ÒåµÄstatic±íʾֻÔڸú¯ÊýÌåÄÚÓÐЧ¡£ÁíÍ⣬º¯ÊýÖеÄ"adgfdf"ÕâÑùµÄ×Ö·û´®´æ·ÅÔÚ³£Á¿Çø¡£
¶þ±äÁ¿µÄ´æ´¢Àà±ð£º
±äÁ¿´Ó×÷ÓÃÓò£¨¿Õ¼ä£©½Ç¶È¿ÉÒÔ·ÖΪȫ¾Ö±äÁ¿ºÍ¾Ö²¿±äÁ¿¡£
¶ø´ÓÉú´æÆÚ£¨Ê±¼ä£©½Ç¶È¿ÉÒÔ·ÖΪ¾²Ì¬´æ´¢·½Ê½ºÍ¶¯Ì¬´æ´¢·½Ê½
¾ßÌå°üÀ¨£º
a) ×Ô¶¯µÄ£¨auto£©
b) ¾²Ì¬µÄ£¨static£©
c) ¼Ä´æÆ÷µÄ£¨register£©
d) ÍⲿµÄ£¨extern£©
¾²Ì¬´æ´¢·½Ê½£º³ÌÐòÔËÐÐÆÚ¼äÓÉϵͳ·ÖÅä¹Ì¶¨µÄ´æ´¢¿Õ¼äµÄ·½Ê½
¶¯Ì¬´æ´¢·½Ê½£º³ÌÐòÔËÐÐÆÚ¼ä¸ù¾ÝÐèÒª½øÐж¯Ì¬µÄ·ÖÅä´æ´¢¿Õ¼ä·½Ê½
ÄÚ´æÖй©Óû§Ê¹ÓõĴ洢¿Õ¼ä£º
1. ³ÌÐòÇø
2. ¾²Ì¬´æ´¢Çø
3. ¶¯Ì¬´æ´¢Çø
Êý¾Ý´æ·ÅÔÚºóÁ½¸ö´æ´¢ÇøÖУ¬
È«¾Ö±äÁ¿´æ·ÅÔÚ¾²Ì¬´æ´¢ÇøÖÐ
º¯ÊýÐÎʽ²ÎÊý£¨µ÷ÓÃʱ£©ºÍ¾Ö²¿±äÁ¿£¨Î´¼ÓstaticÐÞÊΣ©´æ·ÅÔÚ¶¯Ì¬´æ´¢ÇøÖУ¬ÔÚº¯Êýµ÷ÓÃÍêºó»á±»ÏµÍ³×Ô¶¯Çå¿Õ¡£
ÏÂÃæÎÒÖ»½éÉÜǰÁ½¸ö£º
1) Auto:
±äÁ¿Èç¹û²»¼ÓstaticÐÞÊαäÁ¿£¬Ôò¶¼ÊǶ¯Ì¬µÄ·ÖÅä´æ´¢¿Õ¼ä£¬ÏµÍ³¸ù¾ÝÐèÒª½øÐзÖÅäºÍÊÍ·ÅÊý¾ÝËùÕ¼ÓõĴ洢¿Õ¼ä
2) Static:
µ±ÎÒÃÇÏ£Íû¾Ö²¿±äÁ¿ÔÚº¯Êýµ÷ÓÃÍêºó²»±»×Ô¶¯µÄÇå¿Õ¶øÊDZ£ÁôÉú³ÉµÄÖµ£¨¼´ËüËùÕ¼ÓõĴ洢µ¥Ôª²»±»ÊÍ·Å£©£¬ÕâʱstaticµÄ×÷ÓþͿÉÒÔÔÚÕâÀïµÄµ½ÌåÏÖÁË£»
StaticÐÞÊÎÈ«¾Ö±äÁ¿Ê±£¬¸Ä±äÁ¿µÄ×÷ÓÃÓòÖ»ÏÞÓÚ±¾Îļþ
ÓÃstat
Ïà¹ØÎĵµ£º
·½·¨Ò»£ºÊ¹ÓÃÁíÒ»¸öʵÏÖÀà·Ö×°ÀàµÄ˽ÓгÉÔ±ºÍº¯Êý£¬ÕâÖÖ·½·¨³ÆÎªPimpl·½·¨¡£
test.h
#pragma once
#include "shared_ptr.hpp"
class CTest
{
public:
CTest(void);
~CTest(void);
void DoSomething();
private:
& ......
@echo --------------------- ÓÃÓÚ¡¶Ò»¸ö²Ù×÷ϵͳµÄʵÏÖ¡·µÄ cmd ---------------------
@echo off
mode con cols=80 lines=60 ::ǰһ¸öÊý×Ö»ò×ÖĸΪ±³¾°É«£¬ºóÒ»¸öÊý×Ö»òÕß×ÖĸΪǰ¾°É«£¬ÏÂÃæÊÇһЩÑÕÉ«¶ÔÓ¦µÄÊý×Ö»ò×Öĸ£º
::0£½ºÚ¡¢1£½À¶¡¢2£½ÂÌ¡¢3£½Ç³ÂÌ¡¢4£½ºì¡¢5£½×Ï¡¢6£½»Æ¡¢7=°×¡¢8=»Ò¡¢9=µÀ¶¡¢A£½µ ......
¹¤×÷ºóÎÒ×ÐϸÔĶÁÁ˹«Ë¾µÄ3DÒýÇæµÄÔ´´úÂ룬ÕâÊÇ¿îά»¤ÁËÊ®¼¸ÄêµÄÒýÇæ£¬Ö÷ÒªÔËÐÐÔÚXBox, PS3ºÍPCƽ̨ÉÏ¡£ºËÐIJ¿·ÖÓÃCÓïÑÔд£¬ÆäËû²¿·Ö×é¼þÓÃC++±àд¡£ÎÒÒÔǰºÜÉÙÓÃCÓïÑÔ±à³Ì(°Ý´óѧ½ÌÓýËù´Í)£¬µ«¶ÁÁËÌ«¶àÕâ¿îÒýÇæµÄ´úÂëÉîÉîµÄÖÐÁËCÓïÑԵ;¡£C¸øÎҵĸоõ¾ÍÊǼòµ¥Ã÷ÁË£¬Òª½â¾öÎÊÌâ¾ÍÊÇÖ±½ÓÈ¥½â¾öËü£¬¾ø²»¹ ......
¡¡Ëã·¨£¨Algorithm£©£º¼ÆËã»ú½âÌâµÄ»ù±¾Ë¼Ïë·½·¨ºÍ²½Öè¡£Ëã·¨µÄÃèÊö£ºÊǶÔÒª½â¾öÒ»¸öÎÊÌâ»òÒªÍê³ÉÒ»ÏîÈÎÎñËù²ÉÈ¡µÄ·½·¨ºÍ²½ÖèµÄÃèÊö£¬°üÀ¨ÐèҪʲôÊý¾Ý£¨ÊäÈëʲôÊý¾Ý¡¢Êä³öʲô½á¹û£©¡¢²ÉÓÃʲô½á¹¹¡¢Ê¹ÓÃʲôÓï¾äÒÔ¼°ÈçºÎ°²ÅÅÕâЩÓï¾äµÈ¡£Í¨³£Ê¹ÓÃ×ÔÈ»ÓïÑÔ¡¢½á¹¹»¯Á÷³Ìͼ¡¢Î±´úÂëµÈÀ´ÃèÊöËã·¨¡£
¡¡¡¡Ò»¡¢¼ÆÊý¡¢ÇóºÍ¡¢Çó½ ......