C/C++ÔËÐÐÖеÄһЩÎÊÌâ¼°Æä½â¾ö
±¾ÈËÔÚ×ö±ÏÉèµÄʱºòÓöµ½µÄһЩÎÊÌ⣬ÔÚÕâÀï×ܽáһϣ¬Ï£Íû»á¶Ô´ó¼ÒÓÐЩ°ïÖú~Óв»×ãÖ®´¦»¹ÍûÖ¸³ö£¬´ó¼Ò¹²Í¬½ø²½^_^
Ò»¡¢»ù±¾½éÉÜ£º
1.ÔËÐл·¾³VC6.0£¨Microsoft Visual C++ 6.0£©£¨http://40.duote.org/microsoft_visualc6.zip£©
2.¿ÎÌâÏà¹ØÄÚÈÝ£ºAVSÊÓƵ±àÂë
¶þ¡¢³öÏÖµÄÎÊÌâ¼°½â¾ö·½·¨£º
1.ÎÊÌ⣺
fatal error C1083:"Cannot open include file: 'Dshow.h': No such file or directoryÖ´ÐÐ cl.exe ʱ³ö´í"
½â¾ö£º
°²×°DirectX SDK(Nov_08°æ)£¨ http://download.microsoft.com/download/5/8/2/58223f79-689d-47ae-bdd0-056116ee8d16/DXSDK_Nov08.exe£©
Platform SDK(PSDK-x86)£¨http://download.microsoft.com/download/a/5/f/a5f0d781-e201-4ab6-8c6a-9bb4efed1e1a/PSDK-x86.exe£©
ÔÚTools£>OptionµÄÑ¡ÏdirectoriesÖÐÔö¼ÓÏàÓ¦ÏîÄ¿¡£
ÔÚInclude filesÔö¼ÓDirectX£¬DirectShowµÄInclude·¾¶£¬ÔÚLibrary filesÖÐÔö¼ÓDirectX£¬DirectShowµÄLib·¾¶¡£
------------------------------------------------------------------
2. ÎÊÌ⣺
fatal error C1083: Cannot open include file: 'dxtrans.h': No such file or directory
½â¾ö£º
°²×°DX SDK Aug2007(×¢Òâ±ØÐëÊÇ2007 aug)£¨http://download.microsoft.com/download/3/3/f/33f1af6e-c61b-4f14-a0de-3e9096ed4b3a/dxsdk_aug2007.exe£©
DirectX 9.0 SDK Update (February 2005) Extras,°ÑÉÏÊöÁ½ÕßµÄincludeºÍlibĿ¼¶¼Ìí¼Óµ½ VC++includeºÍlibĿ¼Ï¡£
-----------------------------------------------------------------------
3. ÎÊÌ⣺
error C2011: '_D3DVECTOR' : 'struct' type redefinition
½â¾ö£º
½á¹¹Ìå±»Öظ´¶¨Ò壬Ӧ¸ÃÊÇÇ°Ãæ°²×°µÄÁ½¸öSDK³åÍ»£¬ËùÒÔɾµôÁ˵ÚÒ»´Î°²×°µÄDirectX SDK(Nov_08°æ)
---------------------------------------------------------
4.ÎÊÌ⣺
fatal error C1083: Cannot open include file: 'streams.h': No such file or directory
½â¾ö£º
ÔÚVC++µÄTools/Option/DirectoryµÄIncludeÖмÓÈë“C:\PROGRAM FILES\EXTRAS\DIRECTSHOW\SAMPLES\C++\DIRECTSHOW\BASECLASSES”
ÔÚlibraryÖÐÌí¼Ó“C:\PROGRAM FILES\EXTRAS\DIRECTSHOW\SAMPLES\C++\DIRECTSHOW\BASECLASSES\DEBUG”
---------------------------------------------------
5.ÎÊÌ⣺
°²×°04°æµÄSDKºó³öÏֵĴíÎó
£¨Îļ
Ïà¹ØÎĵµ£º
Ê×ÏÈÈ·±£ÏµÍ³ÒѾ°²×°ÁËgcc/g++
1> Anjuta
´ò¿ªÖÕ¶Ë:
ÃüÁî:sudo apt-get install anjuta
£¨²»ÄÜ°²×°µÄÐèÒªÌí¼Ó°²×°Ô´
Ìí¼ÓÔ´£ºµã»÷Ö÷²Ëµ¥Éϵēϵͳ”¡·“ϵͳ¹ÜÀ픡·“Èí¼þÔ´”£¬ÊäÈëÃÜÂëºó£¬ÔÚ³öÏֵĶԻ°¿òÖе㓵ÚÈý·½Èí¼þ”£¬
“deb http://anjuta.org.sixxs. ......
Ô´³ÌÐò±àÒë
MakefileµÄ±àд
³ÌÐò¿âµÄÁ´½Ó
³ÌÐòµÄµ÷ÊÔ
Í·ÎļþºÍϵͳÇóÖú
1.Ô´³ÌÐòµÄ±àÒë
ÔÚLinuxÏÂÃæ,Èç¹ûÒª±àÒëÒ»¸öCÓïÑÔÔ´³ÌÐò,ÎÒÃÇҪʹÓÃGNUµÄgcc±àÒëÆ÷. ÏÂÃæÎÒÃÇÒÔÒ»¸öʵÀýÀ´ËµÃ÷ÈçºÎʹÓÃgcc±àÒëÆ÷.
......
ÒýÑÔ
¡¡¡¡Ö¸ÕëÊÇC/C++ÓïÑÔµÄÌØÉ«£¬¶øÊý×éÃûÓëÖ¸ÕëÓÐÌ«¶àµÄÏàËÆ£¬ÉõÖÁºÜ¶àʱºò£¬Êý×éÃû¿ÉÒÔ×÷ΪָÕëʹÓá£ÓÚÊǺõ£¬ºÜ¶à³ÌÐòÉè¼ÆÕ߾ͱ»¸ãºýÍ¿ÁË¡£¶øÐí¶àµÄ´óѧÀÏʦ£¬ËûÃÇÔÚCÓïÑԵĽÌѧ¹ý³ÌÖÐÒ²´íÎóµÃ¸øѧÉú½²½â£º"Êý×éÃû¾ÍÊÇÖ¸Õë"¡£ºÜÐÒÔË£¬ÎҵĴóѧÀÏʦ¾ÍÊÇÆäÖÐÖ®Ò»¡£Ê±ÖÁ½ñÈÕ£¬ÎÒÈÕ¸´Ò»ÈյؽøÐÐ×ÅC/C++ÏîÄ¿µÄ¿ª·¢£¬¶øÉí±ß» ......
9.2 ¹²ÓÃÌå
CÓïÑÔ³ýÁËÌṩ½á¹¹ÌåÕâÖÖ¿É°üº¬¶àÖÖÀàÐÍÊý¾ÝµÄ¹¹ÔìÀàÐÍÍ⣬»¹ÌṩÁËÒ»ÖÖ´ÓÐÎʽÉÏ¿´ºÍ½á¹¹Ìå¿°³Æ“ÂÏÉúÐֵܔµÄ¹¹ÔìÀàÐÍ——¹²ÓÃÌ壨union£©¡£
±¾½Ú´Ó¹²ÓÃÌåµÄ¸ÅÄîÈëÊÖ£¬´Ó¹²ÓÃÌåµÄ¸ÅÄî¡¢Óë½á¹¹ÌåµÄÒìͬ¡¢Ê¹Óõȷ½Ãæ½øÐÐÏêϸµÄ½éÉÜ¡£
9.2.1 ʲôÊǹ²ÓÃÌå
ÏÖʵÉú»îÖУ¬Ä³Ð©Ê ......
1. ʲôÊÇ¿ÕÖ¸Õë³£Á¿£¨null pointer constant£©?
[ 6.3.2.3-3] An integer constant expression with the value 0, or such an expression cast to type void *, is called a null pointer constant.
ÕâÀï¸æËßÎÒÃÇ£º0¡¢0L¡¢'\0'¡¢3 - 3¡¢0 * 17 £¨ËüÃǶ¼ÊÇ“integer constant expression”£©ÒÔ¼° ......