Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB
ÈÈÃűêÇ©£º c c# c++ asp asp.net linux php jsp java vb Python Ruby mysql sql access Sqlite sqlserver delphi javascript Oracle ajax wap mssql html css flash flex dreamweaver xml
 ×îÐÂÎÄÕ : c++

C/C++λ²Ù×÷

C/C++λ²Ù×÷
Ò»¡¢´«Í³µÄC·½Ê½Î»²Ù×÷£º
1.»ù±¾²Ù×÷£º
  ʹÓÃÒ»¸öunsigned int±äÁ¿À´×÷ΪλÈÝÆ÷¡£
2.²Ù×÷·û£º
|  °´Î»»ò²Ù×÷·û£ºresult=exp1|exp2;µ±exp1ºÍexp2ÖжÔӦλÖÐÖÁÉÙÓÐÒ»¸öΪ1ʱ£¬resultÖжÔӦλΪ1£¬·ñÔòΪ0¡£
&  °´Î»Óë²Ù×÷·û£º£ºresult=exp1&exp2;µ±exp1ºÍexp2ÖжÔӦλȫΪ1ʱ£¬resultÖжÔӦλΪ1£¬·ñÔòΪ0¡£
^  °´Î»Òì»ò»ò²Ù×÷·û£ºresult=exp1^exp2;µ±exp1ºÍexp2ÖжÔӦλ²»Ïàͬʱ£¬resultÖжÔӦλΪ1£¬·ñÔòΪ0¡£
~  ·´×ª²Ù×÷·û£º½«Î»ÈÝÆ÷ÖеÄËùÓÐλ¶¼·´×ª£¬1±äΪ0£¬0±äΪ1¡£
< < °´Î»×óÒƲÙ×÷·û£ºexp < <n£¬½«ÈÝÆ÷ÖÐËùÓеÄλÏò×óÒÆn룬¿Õ³öµÄλÓÃ0Ìî³ä¡£
>> °´Î»ÓÒÒƲÙ×÷·û£ºexp>>n£¬½«ÈÝÆ÷ÖÐËùÓеÄλÏòÓÒÒÆn룬¿Õ³öµÄλÓÃ0Ìî³ä¡£
|=,&=,^= ·Ö±ð¶ÔÓ¦|&^ÈýÖÖ²Ù×÷·ûµÄ¸´ºÏ²Ù×÷·û¡£
3.³£ÓòÙ×÷
  ÕâÀïÎÒÃǼÙÉèÓÐÒ»¸öresultµÄunsigned int±äÁ¿ÓÃÀ´´¢´æ32¸öѧÉúµÄ³É¼¨£¨Í¨¹ýºÍ²»Í¨¹ý·Ö±ðÓÃ0ºÍ1£©£¬ÕâÑùresult¾ÍÓÐ33루result´ÓÓÒÖÁ×󣬴Ó0¿ªÊ¼¼ÆËãλÊý£¬ÔÚÕâ¸öÀý×ÓÖÐ0λ±»ÀË·Ñ£©¡£
(a) ½«µÚ27λÉèÖÃΪ¼°¸ñ£¨Éè×÷1£©ÆäËûλ²»±ä£º
  result|£½(1 < <2 ......

C/C++λ²Ù×÷

C/C++λ²Ù×÷
Ò»¡¢´«Í³µÄC·½Ê½Î»²Ù×÷£º
1.»ù±¾²Ù×÷£º
  ʹÓÃÒ»¸öunsigned int±äÁ¿À´×÷ΪλÈÝÆ÷¡£
2.²Ù×÷·û£º
|  °´Î»»ò²Ù×÷·û£ºresult=exp1|exp2;µ±exp1ºÍexp2ÖжÔӦλÖÐÖÁÉÙÓÐÒ»¸öΪ1ʱ£¬resultÖжÔӦλΪ1£¬·ñÔòΪ0¡£
&  °´Î»Óë²Ù×÷·û£º£ºresult=exp1&exp2;µ±exp1ºÍexp2ÖжÔӦλȫΪ1ʱ£¬resultÖжÔӦλΪ1£¬·ñÔòΪ0¡£
^  °´Î»Òì»ò»ò²Ù×÷·û£ºresult=exp1^exp2;µ±exp1ºÍexp2ÖжÔӦλ²»Ïàͬʱ£¬resultÖжÔӦλΪ1£¬·ñÔòΪ0¡£
~  ·´×ª²Ù×÷·û£º½«Î»ÈÝÆ÷ÖеÄËùÓÐλ¶¼·´×ª£¬1±äΪ0£¬0±äΪ1¡£
< < °´Î»×óÒƲÙ×÷·û£ºexp < <n£¬½«ÈÝÆ÷ÖÐËùÓеÄλÏò×óÒÆn룬¿Õ³öµÄλÓÃ0Ìî³ä¡£
>> °´Î»ÓÒÒƲÙ×÷·û£ºexp>>n£¬½«ÈÝÆ÷ÖÐËùÓеÄλÏòÓÒÒÆn룬¿Õ³öµÄλÓÃ0Ìî³ä¡£
|=,&=,^= ·Ö±ð¶ÔÓ¦|&^ÈýÖÖ²Ù×÷·ûµÄ¸´ºÏ²Ù×÷·û¡£
3.³£ÓòÙ×÷
  ÕâÀïÎÒÃǼÙÉèÓÐÒ»¸öresultµÄunsigned int±äÁ¿ÓÃÀ´´¢´æ32¸öѧÉúµÄ³É¼¨£¨Í¨¹ýºÍ²»Í¨¹ý·Ö±ðÓÃ0ºÍ1£©£¬ÕâÑùresult¾ÍÓÐ33루result´ÓÓÒÖÁ×󣬴Ó0¿ªÊ¼¼ÆËãλÊý£¬ÔÚÕâ¸öÀý×ÓÖÐ0λ±»ÀË·Ñ£©¡£
(a) ½«µÚ27λÉèÖÃΪ¼°¸ñ£¨Éè×÷1£©ÆäËûλ²»±ä£º
  result|£½(1 < <2 ......

symbian Open C and Open C++ Ïà¹Ø

nokia wiki£ºhttp://developer.symbian.org/wiki/index.php/Open_C_and_Open_C%2B%2B_Technical_Overview/zh-hans
symbianÉÏ¿ª·¢opencʱÐèҪעÒâµÄÎÊÌâ
http://blog.csdn.net/sizhiguo/archive/2009/05/21/4206138.aspx
µÚÒ»£ºÈçprintf¡¢sprint¡¢Îļþ²Ù×÷¡¢socket²Ù×÷µÈ£¬Ä£ÄâÆ÷ÆÁÄ»¶¼»á³öÏÖ°×ÆÁµÈ´ý£¬²¢ÇÒÊÇÒ»Ö±ÏÂÈ¥¡£
½â¾ö·½·¨£º
1¡¢ÐÞ¸ÄÅäÖÃÎļþc:/system/data/config.ini£¨Ä£ÄâÆ÷·¾¶£©£¬Öض¨Ïòstdio/stdoutµ½Îļþ¡£
¾ßÌåÈçÏ£º
config.ini(c:\system\data\)
[STDIO]
STDIN = MEDIA1
STDOUT = MEDIA4
[MEDIA1]
type = file
path = C:\system\data\in.txt
max size = 100
[MEDIA2]
type = serial
baud = 214
port = COMM::10
[MEDIA3]
type = console
width = -1
height = -1
[MEDIA4]
type = file
path = c:\system\data\out.txt
max size = 1000
2¡¢ÉÏÊö°ì·¨Ö®ºó»¹²»ÐÐÇë¹Ø±ÕɱÈëÈí¼þ£¬ÓÈÆäÊÇ360Èí¼þ£¡
Õæ»úÉÏ°²×°ÎļþʱÐèÒªÊ×ÏÈ°²×°ÈçÏÂÎļþ£¬ËùÔÚĿ¼Ϊc:\Symbian\9.2\S60_3rd_FP1\nokia_plugin\openc\s60opencsis
1)pips_nokia_1_3_SS.sis
2)glib.sis
3)ssl.sis
±¾ÎÄÀ´×ÔCSDN²©¿Í£¬×ªÔØÇë±êÃ÷³ö´¦£ºhttp://blog.csdn.net/sizhiguo/ ......

symbian Open C and Open C++ Ïà¹Ø

nokia wiki£ºhttp://developer.symbian.org/wiki/index.php/Open_C_and_Open_C%2B%2B_Technical_Overview/zh-hans
symbianÉÏ¿ª·¢opencʱÐèҪעÒâµÄÎÊÌâ
http://blog.csdn.net/sizhiguo/archive/2009/05/21/4206138.aspx
µÚÒ»£ºÈçprintf¡¢sprint¡¢Îļþ²Ù×÷¡¢socket²Ù×÷µÈ£¬Ä£ÄâÆ÷ÆÁÄ»¶¼»á³öÏÖ°×ÆÁµÈ´ý£¬²¢ÇÒÊÇÒ»Ö±ÏÂÈ¥¡£
½â¾ö·½·¨£º
1¡¢ÐÞ¸ÄÅäÖÃÎļþc:/system/data/config.ini£¨Ä£ÄâÆ÷·¾¶£©£¬Öض¨Ïòstdio/stdoutµ½Îļþ¡£
¾ßÌåÈçÏ£º
config.ini(c:\system\data\)
[STDIO]
STDIN = MEDIA1
STDOUT = MEDIA4
[MEDIA1]
type = file
path = C:\system\data\in.txt
max size = 100
[MEDIA2]
type = serial
baud = 214
port = COMM::10
[MEDIA3]
type = console
width = -1
height = -1
[MEDIA4]
type = file
path = c:\system\data\out.txt
max size = 1000
2¡¢ÉÏÊö°ì·¨Ö®ºó»¹²»ÐÐÇë¹Ø±ÕɱÈëÈí¼þ£¬ÓÈÆäÊÇ360Èí¼þ£¡
Õæ»úÉÏ°²×°ÎļþʱÐèÒªÊ×ÏÈ°²×°ÈçÏÂÎļþ£¬ËùÔÚĿ¼Ϊc:\Symbian\9.2\S60_3rd_FP1\nokia_plugin\openc\s60opencsis
1)pips_nokia_1_3_SS.sis
2)glib.sis
3)ssl.sis
±¾ÎÄÀ´×ÔCSDN²©¿Í£¬×ªÔØÇë±êÃ÷³ö´¦£ºhttp://blog.csdn.net/sizhiguo/ ......

±àд¿ÉÒÆÖ²C/C++³ÌÐòÒªµã

      1.·Ö²ãÉè¼Æ£¬¸ôÀëƽ̨Ïà¹ØµÄ´úÂë¡£¾ÍÏñ¿É²âÊÔÐÔÒ»Ñù£¬¿ÉÒÆÖ²ÐÔÒ²Òª´ÓÉè¼Æ×¥Æð¡£Ò»°ãÀ´Ëµ£¬×îÉϲãºÍ×îϲ㶼²»¾ßÓÐÁ¼ºÃµÄ¿ÉÒÆÖ²ÐÔ¡£×îÉϲãÊÇ
GUI£¬´ó¶àÊýGUI¶¼²»ÊÇ¿çƽ̨µÄ£¬ÈçWin32 SDKºÍMFC¡£×îϲãÊDzÙ×÷ϵͳAPI£¬´ó¶à²¿·Ö²Ù×÷ϵͳAPI¶¼ÊÇרÓõġ£
¡¡¡¡
Èç¹ûÕâÁ½²ãµÄ´úÂëÉ¢²¼ÔÚÕû¸öÈí¼þÖУ¬ÄÇôÕâ¸öÈí¼þµÄ¿ÉÖ²ÐÔ½«·Ç³£µÄ²î£¬ÕâÊDz»ÑÔ×ÔÃ÷µÄ¡£ÄÇôÈçºÎ±ÜÃâÕâÖÖÇé¿öÄØ£¿µ±È»ÊÇ·Ö²ãÉè¼ÆÁË£º
¡¡¡¡
×îµ×²ã²ÉÓÃAdapterģʽ£¬°Ñ²»Í¬²Ù×÷ϵͳµÄAPI·â×°³ÉÒ»Ì×ͳһµÄ½Ó¿Ú¡£ÖÁÓÚ·â×°³ÉÀ໹ÊÇ·â×°³Éº¯Êý£¬Òª¿´Äã²ÉÓõÄC»¹ÊÇC++дµÄ³ÌÐòÁË¡£Õâ¿´Æð
À´ºÜ¼òµ¥£¬Æäʵ²»¾¡È»£¨¿´ÍêÕûƪÎÄÕºóÄã»áÃ÷°×µÄ£©£¬Ëü½«ºÄÈ¥Äã´óÁ¿µÄʱ¼äÈ¥±àд´úÂ룬ȥ²âÊÔËüÃÇ¡£²ÉÓÃÏÖ´æµÄ³ÌÐò¿â£¬ÊÇÃ÷ÖǵÄ×ö·¨£¬ÓкܶàÕâÑùµÄ¿â£¬±È
È磬C¿âÓÐglib£¨GNOMEµÄ»ù´¡Àࣩ£¬C++¿âÓÐACE(ADAPTIVE Communication
Environment)µÈµÈ£¬ÔÚ¿ª·¢µÚÒ»¸öƽ̨ʱ¾Í²ÉÓÃÕâЩ¿â£¬¿ÉÒÔ´ó´ó¼õÉÙÒÆÖ²µÄ¹¤×÷Á¿¡£
¡¡¡¡×îÉϲã²ÉÓÃMVCÄ£ÐÍ£¬·ÖÀë½çÃæ±íÏÖÓë
ÄÚ²¿Âß¼­´úÂë¡£°Ñ´ó²¿·Ö´úÂë·Åµ½ÄÚ²¿Âß¼­ÀïÃ棬½çÃæ½ö½öÊÇÏÔʾºÍ½ÓÊÕÊäÈ룬¼´Ê¹Òª»»Ò»Ì×GUI£¬¹¤×÷Á¿Ò²²»´ó¡£ÕâͬʱҲÊÇÌá¸ß¿É²âÊÔÐÔµÄÊÖ¶ÎÖ®Ò»£ ......

±àд¿ÉÒÆÖ²C/C++³ÌÐòÒªµã

      1.·Ö²ãÉè¼Æ£¬¸ôÀëƽ̨Ïà¹ØµÄ´úÂë¡£¾ÍÏñ¿É²âÊÔÐÔÒ»Ñù£¬¿ÉÒÆÖ²ÐÔÒ²Òª´ÓÉè¼Æ×¥Æð¡£Ò»°ãÀ´Ëµ£¬×îÉϲãºÍ×îϲ㶼²»¾ßÓÐÁ¼ºÃµÄ¿ÉÒÆÖ²ÐÔ¡£×îÉϲãÊÇ
GUI£¬´ó¶àÊýGUI¶¼²»ÊÇ¿çƽ̨µÄ£¬ÈçWin32 SDKºÍMFC¡£×îϲãÊDzÙ×÷ϵͳAPI£¬´ó¶à²¿·Ö²Ù×÷ϵͳAPI¶¼ÊÇרÓõġ£
¡¡¡¡
Èç¹ûÕâÁ½²ãµÄ´úÂëÉ¢²¼ÔÚÕû¸öÈí¼þÖУ¬ÄÇôÕâ¸öÈí¼þµÄ¿ÉÖ²ÐÔ½«·Ç³£µÄ²î£¬ÕâÊDz»ÑÔ×ÔÃ÷µÄ¡£ÄÇôÈçºÎ±ÜÃâÕâÖÖÇé¿öÄØ£¿µ±È»ÊÇ·Ö²ãÉè¼ÆÁË£º
¡¡¡¡
×îµ×²ã²ÉÓÃAdapterģʽ£¬°Ñ²»Í¬²Ù×÷ϵͳµÄAPI·â×°³ÉÒ»Ì×ͳһµÄ½Ó¿Ú¡£ÖÁÓÚ·â×°³ÉÀ໹ÊÇ·â×°³Éº¯Êý£¬Òª¿´Äã²ÉÓõÄC»¹ÊÇC++дµÄ³ÌÐòÁË¡£Õâ¿´Æð
À´ºÜ¼òµ¥£¬Æäʵ²»¾¡È»£¨¿´ÍêÕûƪÎÄÕºóÄã»áÃ÷°×µÄ£©£¬Ëü½«ºÄÈ¥Äã´óÁ¿µÄʱ¼äÈ¥±àд´úÂ룬ȥ²âÊÔËüÃÇ¡£²ÉÓÃÏÖ´æµÄ³ÌÐò¿â£¬ÊÇÃ÷ÖǵÄ×ö·¨£¬ÓкܶàÕâÑùµÄ¿â£¬±È
È磬C¿âÓÐglib£¨GNOMEµÄ»ù´¡Àࣩ£¬C++¿âÓÐACE(ADAPTIVE Communication
Environment)µÈµÈ£¬ÔÚ¿ª·¢µÚÒ»¸öƽ̨ʱ¾Í²ÉÓÃÕâЩ¿â£¬¿ÉÒÔ´ó´ó¼õÉÙÒÆÖ²µÄ¹¤×÷Á¿¡£
¡¡¡¡×îÉϲã²ÉÓÃMVCÄ£ÐÍ£¬·ÖÀë½çÃæ±íÏÖÓë
ÄÚ²¿Âß¼­´úÂë¡£°Ñ´ó²¿·Ö´úÂë·Åµ½ÄÚ²¿Âß¼­ÀïÃ棬½çÃæ½ö½öÊÇÏÔʾºÍ½ÓÊÕÊäÈ룬¼´Ê¹Òª»»Ò»Ì×GUI£¬¹¤×÷Á¿Ò²²»´ó¡£ÕâͬʱҲÊÇÌá¸ß¿É²âÊÔÐÔµÄÊÖ¶ÎÖ®Ò»£ ......

CÖÐÈçºÎµ÷ÓÃC++£¿C++ÖÐÈçºÎµ÷ÓÃC

CÖÐÈçºÎµ÷ÓÃC++£¿C++ÖÐÈçºÎµ÷ÓÃC?Õâ¸öÎÊÌâÊÇÐí¶àÈí¼þ¹«Ë¾ÃæÊÔ¹ý³ÌÖлáÎʵ½µÄÒ»¸ö³£¼ûÎÊÌâ¡£»Ø´ðÕâ¸öÎÊÌâ²¢²»À§ÄÑ£¬ÄǾÍÊÇʹÓÃ
extern "C",µ«ÊÇÃæÊÔ¹Ù¿ÉÄÜÏëͨ¹ýÕâ¸öÎÊÌâÁ˽âÄã¶ÔC/C++ÕÆÎյij̶ȡ£ÏÂÃæ×Ðϸ·ÖÎö¸ÃÎÊÌâ¡£
    Ê×ÏÈ£¬×÷
ΪexternÊÇC/C++ÓïÑÔÖбíÃ÷º¯ÊýºÍÈ«¾Ö±äÁ¿×÷Ó÷¶Î§£¨¿É¼ûÐÔ£©µÄ¹Ø¼ü×Ö£¬¸Ã¹Ø¼ü×Ö¸æËß±àÒëÆ÷£¬ÆäÉùÃ÷µÄº¯ÊýºÍ±äÁ¿¿ÉÒÔÔÚ±¾Ä£¿é»òÆäËüÄ£¿éÖÐʹ

    Í¨³££¬ÔÚÄ£¿éµÄÍ·ÎļþÖжԱ¾Ä£¿éÌṩ¸øÆäËüÄ£¿éÒýÓõĺ¯ÊýºÍÈ«¾Ö±äÁ¿ÒԹؼü×ÖexternÉùÃ÷¡£ÀýÈ磬Èç¹ûÄ£¿éBÓûÒýÓøÃÄ£
¿éAÖж¨ÒåµÄÈ«¾Ö±äÁ¿ºÍº¯ÊýʱֻÐè°üº¬Ä£¿éAµÄÍ·Îļþ¼´¿É¡£ÕâÑù£¬Ä£¿éBÖе÷ÓÃÄ£¿éAÖеĺ¯Êýʱ£¬ÔÚ±àÒë½×¶Î£¬Ä£¿éBËäÈ»ÕÒ²»µ½¸Ãº¯Êý£¬µ«ÊDz¢²»»á±¨´í£»
Ëü»áÔÚÁ¬½Ó½×¶ÎÖдÓÄ£¿éA±àÒëÉú³ÉµÄÄ¿±ê´úÂëÖÐÕÒµ½´Ëº¯Êý
extern "C"ÊÇÁ¬½ÓÉêÃ÷(linkage
declaration),±»extern "C"ÐÞÊεıäÁ¿ºÍº¯ÊýÊÇ°´ÕÕCÓïÑÔ·½Ê½±àÒëºÍÁ¬½ÓµÄ,À´¿´¿´C++ÖжÔÀàËÆCµÄº¯ÊýÊÇÔõÑù±àÒëµÄ£º
×÷
ΪһÖÖÃæÏò¶ÔÏóµÄÓïÑÔ£¬C++Ö§³Öº¯ÊýÖØÔØ£¬¶ø¹ý³ÌʽÓïÑÔCÔò²»Ö§³Ö¡£º¯Êý±»C++±àÒëºóÔÚ·ûºÅ¿âÖеÄÃû×ÖÓëCÓïÑԵIJ»Í¬¡£ÀýÈ磬¼Ù ......

CÖÐÈçºÎµ÷ÓÃC++£¿C++ÖÐÈçºÎµ÷ÓÃC

CÖÐÈçºÎµ÷ÓÃC++£¿C++ÖÐÈçºÎµ÷ÓÃC?Õâ¸öÎÊÌâÊÇÐí¶àÈí¼þ¹«Ë¾ÃæÊÔ¹ý³ÌÖлáÎʵ½µÄÒ»¸ö³£¼ûÎÊÌâ¡£»Ø´ðÕâ¸öÎÊÌâ²¢²»À§ÄÑ£¬ÄǾÍÊÇʹÓÃ
extern "C",µ«ÊÇÃæÊÔ¹Ù¿ÉÄÜÏëͨ¹ýÕâ¸öÎÊÌâÁ˽âÄã¶ÔC/C++ÕÆÎյij̶ȡ£ÏÂÃæ×Ðϸ·ÖÎö¸ÃÎÊÌâ¡£
    Ê×ÏÈ£¬×÷
ΪexternÊÇC/C++ÓïÑÔÖбíÃ÷º¯ÊýºÍÈ«¾Ö±äÁ¿×÷Ó÷¶Î§£¨¿É¼ûÐÔ£©µÄ¹Ø¼ü×Ö£¬¸Ã¹Ø¼ü×Ö¸æËß±àÒëÆ÷£¬ÆäÉùÃ÷µÄº¯ÊýºÍ±äÁ¿¿ÉÒÔÔÚ±¾Ä£¿é»òÆäËüÄ£¿éÖÐʹ

    Í¨³££¬ÔÚÄ£¿éµÄÍ·ÎļþÖжԱ¾Ä£¿éÌṩ¸øÆäËüÄ£¿éÒýÓõĺ¯ÊýºÍÈ«¾Ö±äÁ¿ÒԹؼü×ÖexternÉùÃ÷¡£ÀýÈ磬Èç¹ûÄ£¿éBÓûÒýÓøÃÄ£
¿éAÖж¨ÒåµÄÈ«¾Ö±äÁ¿ºÍº¯ÊýʱֻÐè°üº¬Ä£¿éAµÄÍ·Îļþ¼´¿É¡£ÕâÑù£¬Ä£¿éBÖе÷ÓÃÄ£¿éAÖеĺ¯Êýʱ£¬ÔÚ±àÒë½×¶Î£¬Ä£¿éBËäÈ»ÕÒ²»µ½¸Ãº¯Êý£¬µ«ÊDz¢²»»á±¨´í£»
Ëü»áÔÚÁ¬½Ó½×¶ÎÖдÓÄ£¿éA±àÒëÉú³ÉµÄÄ¿±ê´úÂëÖÐÕÒµ½´Ëº¯Êý
extern "C"ÊÇÁ¬½ÓÉêÃ÷(linkage
declaration),±»extern "C"ÐÞÊεıäÁ¿ºÍº¯ÊýÊÇ°´ÕÕCÓïÑÔ·½Ê½±àÒëºÍÁ¬½ÓµÄ,À´¿´¿´C++ÖжÔÀàËÆCµÄº¯ÊýÊÇÔõÑù±àÒëµÄ£º
×÷
ΪһÖÖÃæÏò¶ÔÏóµÄÓïÑÔ£¬C++Ö§³Öº¯ÊýÖØÔØ£¬¶ø¹ý³ÌʽÓïÑÔCÔò²»Ö§³Ö¡£º¯Êý±»C++±àÒëºóÔÚ·ûºÅ¿âÖеÄÃû×ÖÓëCÓïÑԵIJ»Í¬¡£ÀýÈ磬¼Ù ......

C/C++ÖÐÖظ´¶¨ÒåµÄÎÊÌâ


ÓÃ#include¿ÉÒÔ°üº¬ÆäËûÍ·ÎļþÖбäÁ¿¡¢º¯ÊýµÄÉùÃ÷£¬ÎªÊ²Ã´»¹Òªextern¹Ø¼ü×Ö,Èç¹ûÎÒÏëÒýÓÃÒ»¸öÈ«¾Ö±äÁ¿»ò
º¯Êýa£¬ÎÒÖ»ÒªÖ±½ÓÔÚÔ´ÎļþÖаüº¬#include<xxx.h>
(xxx.h°üº¬ÁËaµÄÉùÃ÷)²»¾Í¿ÉÒÔÁËô£¬ÎªÊ²Ã´»¹ÒªÓÃexternÄØ£¿£¿Õâ¸öÎÊÌâÒ»Ö±Ò²ÊÇËÆÊǶø·ÇµÄÀ§ÈÅ×ÅÎÒÐí¶àÄêÁË£¬½ñÌìÉÏÍøºÝºÝ²éÁËÒ»ÏÂ×ÜËãСÓÐ
Ëù»ñÁË£º
Í·Îļþ
Ê×ÏÈ˵ÏÂÍ·Îļþ£¬ÆäʵͷÎļþ¶Ô¼ÆËã»ú¶øÑÔûʲô×÷Óã¬ËýÖ»ÊÇÔÚÔ¤±à
ÒëʱÔÚ#includeµÄµØ·½Õ¹¿ªÒ»Ï£¬Ã»±ðµÄÒâÒåÁË£¬ÆäʵͷÎļþÖ÷ÒªÊǸø±ðÈË¿´µÄ¡£
ÎÒ×ö¹ýÒ»¸öʵÑ飬½«Í·ÎļþµÄºó׺¸Ä³Éxxx.txt£¬È»ºóÔÚÒýÓøÃÍ·ÎļþµÄµØ·½ÓÃ
#include"xxx.txt"
±àÒ룬Á´½Ó¶¼ºÜ˳ÀûµÄ¹ýÈ¥ÁË£¬ÓÉ´Ë¿ÉÖª£¬Í·Îļþ½ö½öΪÔĶÁ´úÂë×÷Óã¬Ã»ÆäËûµÄ×÷ÓÃ
ÁË£¡
²»¹ÜÊÇC»¹ÊÇC++£¬Äã°ÑÄãµÄº¯Êý£¬±äÁ¿»òÕ߽ṹÌ壬ÀàɶµÄ·ÅÔÚÄãµÄ.c»òÕß.cppÎļþÀȻºó±àÒë³É
lib,dll,obj,.oµÈµÈ£¬È»ºó±ðÈËÓõÄʱºò ×î»ù±¾µÄgcc hisfile.cpp yourfile.o|obj|dll|lib µÈµÈ¡£
µ«
¶ÔÓÚÎÒÃdzÌÐòÔ±¶øÑÔ£¬ËûÃÇÔõô֪µÀÄãµÄlib,dll...ÀïÃæµ½µ×ÓÐʲô¶«Î÷£¿Òª¿´ÄãµÄÍ·Îļþ¡£ÄãµÄÍ·Îļþ¾ÍÊǶÔÓû§µÄ˵Ã÷¡£º¯Êý£¬²ÎÊý£¬¸÷ÖÖ¸÷ÑùµÄ½Ó
¿ÚµÄ˵Ã÷¡£
   
ÄǼÈÈ»ÊÇ˵Ã÷£¬ÄÇà ......

C/C++ÖÐÖظ´¶¨ÒåµÄÎÊÌâ


ÓÃ#include¿ÉÒÔ°üº¬ÆäËûÍ·ÎļþÖбäÁ¿¡¢º¯ÊýµÄÉùÃ÷£¬ÎªÊ²Ã´»¹Òªextern¹Ø¼ü×Ö,Èç¹ûÎÒÏëÒýÓÃÒ»¸öÈ«¾Ö±äÁ¿»ò
º¯Êýa£¬ÎÒÖ»ÒªÖ±½ÓÔÚÔ´ÎļþÖаüº¬#include<xxx.h>
(xxx.h°üº¬ÁËaµÄÉùÃ÷)²»¾Í¿ÉÒÔÁËô£¬ÎªÊ²Ã´»¹ÒªÓÃexternÄØ£¿£¿Õâ¸öÎÊÌâÒ»Ö±Ò²ÊÇËÆÊǶø·ÇµÄÀ§ÈÅ×ÅÎÒÐí¶àÄêÁË£¬½ñÌìÉÏÍøºÝºÝ²éÁËÒ»ÏÂ×ÜËãСÓÐ
Ëù»ñÁË£º
Í·Îļþ
Ê×ÏÈ˵ÏÂÍ·Îļþ£¬ÆäʵͷÎļþ¶Ô¼ÆËã»ú¶øÑÔûʲô×÷Óã¬ËýÖ»ÊÇÔÚÔ¤±à
ÒëʱÔÚ#includeµÄµØ·½Õ¹¿ªÒ»Ï£¬Ã»±ðµÄÒâÒåÁË£¬ÆäʵͷÎļþÖ÷ÒªÊǸø±ðÈË¿´µÄ¡£
ÎÒ×ö¹ýÒ»¸öʵÑ飬½«Í·ÎļþµÄºó׺¸Ä³Éxxx.txt£¬È»ºóÔÚÒýÓøÃÍ·ÎļþµÄµØ·½ÓÃ
#include"xxx.txt"
±àÒ룬Á´½Ó¶¼ºÜ˳ÀûµÄ¹ýÈ¥ÁË£¬ÓÉ´Ë¿ÉÖª£¬Í·Îļþ½ö½öΪÔĶÁ´úÂë×÷Óã¬Ã»ÆäËûµÄ×÷ÓÃ
ÁË£¡
²»¹ÜÊÇC»¹ÊÇC++£¬Äã°ÑÄãµÄº¯Êý£¬±äÁ¿»òÕ߽ṹÌ壬ÀàɶµÄ·ÅÔÚÄãµÄ.c»òÕß.cppÎļþÀȻºó±àÒë³É
lib,dll,obj,.oµÈµÈ£¬È»ºó±ðÈËÓõÄʱºò ×î»ù±¾µÄgcc hisfile.cpp yourfile.o|obj|dll|lib µÈµÈ¡£
µ«
¶ÔÓÚÎÒÃdzÌÐòÔ±¶øÑÔ£¬ËûÃÇÔõô֪µÀÄãµÄlib,dll...ÀïÃæµ½µ×ÓÐʲô¶«Î÷£¿Òª¿´ÄãµÄÍ·Îļþ¡£ÄãµÄÍ·Îļþ¾ÍÊǶÔÓû§µÄ˵Ã÷¡£º¯Êý£¬²ÎÊý£¬¸÷ÖÖ¸÷ÑùµÄ½Ó
¿ÚµÄ˵Ã÷¡£
   
ÄǼÈÈ»ÊÇ˵Ã÷£¬ÄÇà ......

Window+GCC+CDTÓÃEclipse¿ª·¢C¡¢C++

Eclipse³ýÁË¿ÉÒÔ開發JavaÖ®Í⣬還Ö§Ô®ÁË許¶à語ÑÔ£¬現ÔÚÏȽé紹
C¡¢C++µÄ開發環¾³設¶¨£¬ÒÔááÓÐ機會ÔÙ½é紹ÆäËüµÄ¡£Enjoy it£¡
OS£ºWindows XP Professional SP1
ʹÓð汾£ºEclipse 2.1.2
Ò».Ê×ÏÈÒªÏÂ載CDT£¬Eclipse 2.1.2ʹÓÃÕߣ¬請ÏÂ載這項£º
CDT 1.2 Full for Windows R2.1.1
1.2.0 GA - Full - Windows¡£
Eclipse 2.1.3ʹÓÃÕß請ÏÂ載£ºCDT 1.2.1¡£
Eclipse 3.0
M7ʹÓÃÕß請ÏÂ載£ºCDT 2.0 M7¡£
Eclipse 3.0 M8ʹÓÃÕß請ÏÂ載£ºCDT 2.0 M8¡£
Eclipse 3.0
M9ʹÓÃÕß請ÏÂ載£ºCDT 2.0 M9¡£
ÏÂ載網Ö·£ºhttp://www.eclipse.org/cdt/
°²裝£º將½â壓縮ááµÄfeatures¡¢pluginsÕû個資ÁÏ夾複製µ½Eclipse°²裝資ÁÏ
裡£¬ÖØÐÂ開啟Eclipse¼´¿É¡£
¶þ.ÏÂ載¿ÉÔÚWindowsÉÏʹÓõÄGNU C¡¢C++編譯Æ÷£¬這裡ÒªÏÂ載µÄÊÇ£ºMinGW¡£
Download頁ÃæºÜ長 ......

Window+GCC+CDTÓÃEclipse¿ª·¢C¡¢C++

Eclipse³ýÁË¿ÉÒÔ開發JavaÖ®Í⣬還Ö§Ô®ÁË許¶à語ÑÔ£¬現ÔÚÏȽé紹
C¡¢C++µÄ開發環¾³設¶¨£¬ÒÔááÓÐ機會ÔÙ½é紹ÆäËüµÄ¡£Enjoy it£¡
OS£ºWindows XP Professional SP1
ʹÓð汾£ºEclipse 2.1.2
Ò».Ê×ÏÈÒªÏÂ載CDT£¬Eclipse 2.1.2ʹÓÃÕߣ¬請ÏÂ載這項£º
CDT 1.2 Full for Windows R2.1.1
1.2.0 GA - Full - Windows¡£
Eclipse 2.1.3ʹÓÃÕß請ÏÂ載£ºCDT 1.2.1¡£
Eclipse 3.0
M7ʹÓÃÕß請ÏÂ載£ºCDT 2.0 M7¡£
Eclipse 3.0 M8ʹÓÃÕß請ÏÂ載£ºCDT 2.0 M8¡£
Eclipse 3.0
M9ʹÓÃÕß請ÏÂ載£ºCDT 2.0 M9¡£
ÏÂ載網Ö·£ºhttp://www.eclipse.org/cdt/
°²裝£º將½â壓縮ááµÄfeatures¡¢pluginsÕû個資ÁÏ夾複製µ½Eclipse°²裝資ÁÏ
裡£¬ÖØÐÂ開啟Eclipse¼´¿É¡£
¶þ.ÏÂ載¿ÉÔÚWindowsÉÏʹÓõÄGNU C¡¢C++編譯Æ÷£¬這裡ÒªÏÂ載µÄÊÇ£ºMinGW¡£
Download頁ÃæºÜ長 ......
×ܼǼÊý:969; ×ÜÒ³Êý:162; ÿҳ6 Ìõ; Ê×Ò³ ÉÏÒ»Ò³ [8] [9] [10] [11] 12 [13] [14] [15] [16] [17]  ÏÂÒ»Ò³ βҳ
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ