C/C++ÖÐ ºê¶¨Òå×Ö·û´® ²Ù×÷
¹ØÓڼǺÅÕ³Ìù²Ù×÷·û(token paste operator): ##
1. ¼òµ¥µÄ˵£¬“##”ÊÇÒ»ÖÖ·Ö¸ôÁ¬½Ó·½Ê½£¬ËüµÄ×÷ÓÃÊÇÏÈ·Ö¸ô£¬È»ºó½øÐÐÇ¿ÖÆÁ¬½Ó¡£
ÆäÖУ¬·Ö¸ôµÄ×÷ÓÃÀàËÆÓÚ¿Õ¸ñ¡£ÎÒÃÇÖªµÀÔÚÆÕͨµÄºê¶¨ÒåÖУ¬Ô¤´¦ÀíÆ÷Ò»°ã°Ñ¿Õ¸ñ
½âÊͳɷֶαêÖ¾£¬¶ÔÓÚÿһ¶ÎºÍÇ°Ãæ±È½Ï£¬ÏàͬµÄ¾Í±»Ìæ»»¡£µ«ÊÇÕâÑù×öµÄ½á¹ûÊÇ£¬
±»Ìæ»»¶ÎÖ®¼ä´æÔÚһЩ¿Õ¸ñ¡£Èç¹ûÎÒÃDz»Ï£Íû³öÏÖÕâЩ¿Õ¸ñ£¬¾Í¿ÉÒÔͨ¹ýÌí¼ÓһЩ
##À´Ìæ´ú¿Õ¸ñ¡£
ÁíÍâһЩ·Ö¸ô±êÖ¾ÊÇ£¬°üÀ¨²Ù×÷·û£¬±ÈÈç +, -, *, /, [,], …£¬ËùÒÔ¾¡¹ÜÏÂÃæµÄ
ºê¶¨ÒåûÓпոñ£¬µ«ÊÇÒÀÈ»±í´ïÓÐÒâÒåµÄ¶¨Ò壺 define add(a, b) a+b
¶øÆäÇ¿ÖÆÁ¬½ÓµÄ×÷ÓÃÊÇ£¬È¥µôºÍÇ°ÃæµÄ×Ö·û´®Ö®¼äµÄ¿Õ¸ñ£¬¶ø°ÑÁ½ÕßÁ¬½ÓÆðÀ´¡£
2. ¾ÙÁÐ – ÊԱȽÏÏÂÊö¼¸¸öºê¶¨ÒåµÄÇø±ð
#define A1(name, type) type name_##type##_type »ò
#define A2(name, type) type name##_##type##_type
A1(a1, int); /* µÈ¼ÛÓÚ: int name_int_type; */
A2(a1, int); /* µÈ¼ÛÓÚ: int a1_int_type; */
½âÊÍ£º
1) ÔÚµÚÒ»¸öºê¶¨ÒåÖУ¬”name”ºÍµÚÒ»¸ö”_”Ö®¼ä£¬ÒÔ¼°µÚ2¸ö”_”ºÍµÚ¶þ¸ö
”type”Ö®¼äûÓб»·Ö¸ô£¬ËùÒÔÔ¤´¦ÀíÆ÷»á°Ñname_##type##_type½âÊͳÉ3¶Î£º
“name_”¡¢“type”¡¢ÒÔ¼°“_type”£¬ÕâÖмäÖ»ÓГtype”ÊÇÔÚºêÇ°Ãæ³öÏÖ¹ý
µÄ£¬ËùÒÔËü¿ÉÒÔ±»ºêÌæ»»¡£
2) ¶øÔÚµÚ¶þ¸öºê¶¨ÒåÖУ¬“name”ºÍµÚÒ»¸ö“_”Ö®¼äÒ²±»·Ö¸ôÁË£¬ËùÒÔ
Ô¤´¦ÀíÆ÷»á°Ñname##_##type##_type½âÊͳÉ4¶Î£º“name”¡¢“_”¡¢“type”
ÒÔ¼°&ldq
Ïà¹ØÎĵµ£º
1¡¢¿ìËÙ³õʼ»¯
char *str = new [size];
str[0]='\0';
2¡¢memcpyµÄÃîÓÃ
ÊÔÌâ6£ºÒÑÖªWAVÎļþ¸ñʽÈçÏÂ±í£¬´ò¿ªÒ»¸öWAVÎļþ£¬ÒÔÊʵ±µÄÊý¾Ý½á¹¹×éÖ¯WAVÎļþÍ·²¢½âÎöWAV¸ñʽµÄ¸÷ÏîÐÅÏ¢¡£
WAVEÎļþ¸ñʽ˵Ã÷±í
Æ«ÒÆµØÖ· ×Ö½ÚÊý Êý¾ÝÀàÐÍ ÄÚ ÈÝ
ÎļþÍ·
00H 4 Char "RIFF"±êÖ¾
......
c/c++Ö§³Ö¿É±ä²ÎÊýµÄº¯Êý£¬¼´º¯ÊýµÄ²ÎÊýÊDz»È·¶¨µÄ¡£
Ò»¡¢ÎªÊ²Ã´ÒªÊ¹Óÿɱä²ÎÊýµÄº¯Êý£¿
Ò»°ãÎÒÃDZà³ÌµÄʱºò£¬º¯ÊýÖÐÐÎʽ²ÎÊýµÄÊýĿͨ³£ÊÇÈ·¶¨µÄ£¬ÔÚµ÷ÓÃʱҪÒÀ´Î¸ø³öÓëÐÎʽ²ÎÊý¶ÔÓ¦µÄËùÓÐʵ¼Ê²ÎÊý¡£µ«ÔÚijЩÇé¿öÏÂÏ£Íûº¯ÊýµÄ²ÎÊý¸öÊý¿ÉÒÔ¸ù¾ÝÐèҪȷ¶¨£¬Òò´ËcÓïÑÔÒýÈë¿É±ä²ÎÊýº¯Êý¡£ÕâÒ²ÊÇc¹¦ÄÜÇ¿´óµÄÒ»¸ö·½Ã棬ÆäËüÄ³Ð©Ó ......
1¡£Ð´Ò»¸öxmlÎļþ
<?xml version="1.0" encoding="utf-8" ?>
- <root>
- <user id="101">
<name>abc</name>
<password>abc</password>
</user>
- <user id="102">
<name>ccc</name>
<password>ccc< ......
1¡¢Java JDKµÄ°²×°
EclipseÊÇÒ»¿î¿çƽ̨µÄ¹¤¾ß£¬Ö»ÐèÒª»ù±¾µÄjavaÐéÄâ»ú¾Í¿ÉÒÔÔËÐС£
°²×°Java
SDKºÜ¼òµ¥¡£µ½http://java.sun.comÉÏÕÒµ½ÊʺÏÄãµÄ²Ù×÷ϵͳµÄJava
JDK°²×°³ÌÐò£¬ÏÂÔØÖ®²¢ÔËÐУ¬Java SDK¾Í»á°²×°µ½ÄãµÄϵͳÖС£
×¢Ò⣬¸ü¸ß°æ±¾µÄEclipseÐèÒª¸ü¸ß°æ±¾µÄJava JDK¡£
2¡¢Eclipse¼°CDTµÄ°²×°
µ½EclipseµÄ¹Ù·½ ......
symbianÓÐ×Ô¼ºµÄÒ»Ì׿⡣ҪºÃµÄ³ÉÐ͵ÄC´úÂ룬±ÈÈçǰÁ½ÌìΪÁ˽âÎöXMLÎÒÒýÓõ½µÄtinyxml¡£ËùÒÔÔÚsymbianÏÂÒýÓÃC±ê×¼¿â¾Í·Ç³£ÖØÒª£¬ÕâÊǶÔÒÔǰ´úÂë·Ç³£ºÃµÄÒÆÖ²·½Ê½¡£
ΪÁËÄÜÓÃC±ê×¼¿â£¬Ö÷ÒªÐÞ¸ÄmmpÎļþÖеÄ·¾¶ºÍ¿âÅäÖá£Ìí¼ÓÈçÏÂÁ½ÐУ¬¾Í¿ÉÒÔÓÃC±ê×¼¿âÁË¡£
SYSTEMINCLUDE /epoc32/include/stdapis
LIBRARY ......