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

c/c++Êä³öºº×Ö

1. ʹÓÃTCHARÀàÐÍ£¬¶¨ÒåÔÚtchar.hÖÐ
#include <tchar.h>
#include <stdio.h>
int main()
{
 TCHAR s[] = "Äã";
 printf("%s \n",s);
 return 0;
}
2.¹ØÓÚC++ÖÐÎÄ×Ö·ûµÄ´¦Àí
 
Ò» ÒýÈëÎÊÌâ
´úÂë wchar_t a[3]=L”Öйú”£¬±àÒëʱ³ö´í£¬³ö´íÐÅϢΪ£ºÊý×éÔ½½ç¡£µ«wchar_t ÊÇÒ»¸ö¿í×Ö½ÚÀàÐÍ£¬Êý×éaµÄ´óСӦΪ6¸ö×Ö½Ú£¬¶øÁ½¸öºº×ֵĵÄunicodeÂëÕ¼4¸ö×Ö½Ú£¬ÔÙ¼ÓÉÏÒ»¸ö½áÊø·û£¬×î¶à6¸ö×Ö½Ú£¬ËùÒÔÓ¦¸Ã²»»áÔ½½ç¡£ÄѵÀÊDZàÒëÆ÷³öÎÊÌâÁË£¿
¶þ ½â¾öÒýÈëÎÊÌâËùÐèµÄ֪ʶ
   Ö÷ÒªÐèÁ½·½ÃæµÄ֪ʶ£¬µÚÒ»¸öΪ×Ö·ûÓÈÆäÊǺº×ֵıàÂ룬ÒÔ¼°ÓïÑԺ͹¤¾ßµÄÖ§³ÖÇé¿ö£¬µÚ¶þ¸öÊÇvc/c++ÖÐMutiByte Charater Set ºÍ Wide Character SetÓйØÄÚ´æ·ÖÅäµÄÇé¿ö.
Èý ºº×ֵıàÂ뷽ʽ¼°ÔÚvc/c++ÖеĴ¦Àí
1.ºº×Ö±àÂ뷽ʽµÄ½éÉÜ
¶ÔÓ¢ÎÄ×Ö·ûµÄ´¦Àí£¬7λASCIIÂë×Ö·û¼¯ÖеÄ×Ö·û¼´¿ÉÂú×ãʹÓÃÐèÇó£¬ÇÒÓ¢ÎÄ×Ö·ûÔÚ¼ÆËã»úÉϵÄÊäÈë¼°Êä³öÒ²·Ç³£¼òµ¥£¬Òò´Ë£¬Ó¢ÎÄ×Ö·ûµÄÊäÈë¡¢´æ´¢¡¢ÄÚ²¿´¦ÀíºÍÊä³ö¶¼¿ÉÒÔÖ»ÓÃͬһ¸ö±àÂ루ÈçASCIIÂ룩¡£
¶øºº×ÖÊÇÒ»ÖÖÏóÐÎÎÄ×Ö£¬×ÖÊý¼«¶à£¨ÏÖ´úºº×ÖÖнö³£ÓÃ×Ö¾ÍÓÐÁù¡¢Æßǧ¸ö£¬×Ü×ÖÊý¸ß´ï5Íò¸öÒÔÉÏ£©£¬ÇÒ×ÖÐθ´ÔÓ£¬Ã¿Ò»¸öºº×Ö¶¼ÓÐ"Òô¡¢ÐΡ¢Òå"ÈýÒªËØ£¬Í¬Òô×Ö¡¢ÒìÌå×ÖÒ²ºÜ¶à£¬ÕâЩ¶¼¸øºº×ֵĵļÆËã»ú´¦Àí´øÀ´Á˺ܴóµÄÀ§ÄÑ¡£ÒªÔÚ¼ÆËã»úÖд¦Àíºº×Ö£¬±ØÐë½â¾öÒÔϼ¸¸öÎÊÌ⣺Ê×ÏÈÊǺº×ÖµÄÊäÈ룬¼´ÈçºÎ°Ñ½á¹¹¸´Ôӵķ½¿éºº×ÖÊäÈëµ½¼ÆËã»úÖÐÈ¥£¬ÕâÊǺº×Ö´¦ÀíµÄ¹Ø¼ü£»Æä´Î£¬ºº×ÖÔÚ¼ÆËã»úÄÚÈçºÎ±íʾºÍ´æ´¢£¿ÈçºÎÓëÎ÷ÎļæÈÝ£¿×îºó£¬ÈçºÎ½«ºº×ֵĴ¦Àí½á¹û´Ó¼ÆËã»úÄÚÊä³ö£¿
Ϊ´Ë£¬±ØÐ뽫ºº×Ö´úÂ뻯£¬¼´¶Ôºº×Ö½øÐбàÂë¡£¶ÔÓ¦ÓÚÉÏÊöºº×Ö´¦Àí¹ý³ÌÖеÄÊäÈë¡¢ÄÚ²¿´¦Àí¼°Êä³öÕâÈý¸öÖ÷Òª»·½Ú£¬Ã¿Ò»¸öºº×ֵıàÂ붼°üÀ¨ÊäÈëÂë¡¢½»»»Âë¡¢ÄÚ²¿ÂëºÍ×ÖÐÎÂë¡£ÔÚ¼ÆËã»úµÄºº×ÖÐÅÏ¢´¦ÀíϵͳÖУ¬´¦Àíºº×ÖʱҪ½øÐÐÈçϵĴúÂëת»»£ºÊäÈëÂë→½»»»Âë→ÄÚ²¿Âë→×ÖÐÎÂë¡£
(1)ÊäÈëÂ룺 ×÷ÓÃÊÇ£¬ÀûÓÃËüºÍÏÖÓеıê×¼Î÷ÎļüÅ̽áºÏÀ´ÊäÈ뺺×Ö¡£ÊäÈëÂëÒ²³ÆΪÍâÂë¡£Ö÷Òª¹éΪËÄÀࣺ
a)      Êý×Ö±àÂ룺Êý×Ö±àÂëÊÇÓõȳ¤µÄÊý×Ö´®Îªºº×ÖÖðÒ»±àºÅ£¬ÒÔÕâ¸ö±àºÅ×÷Ϊºº×ÖµÄÊäÈëÂë¡£ÀýÈ磬ÇøλÂë¡¢µç±¨ÂëµÈ¶¼ÊôÓÚÊý×Ö±àÂë¡£
b)      Æ´ÒôÂ룺ƴÒôÂëÊÇÒÔºº×ֵĶÁÒôΪ»ù´¡µÄÊäÈë°ì·¨¡£
c)      ×ÖÐÎÂ룺×ÖÐÎÂëÊÇÒÔºº×ÖµÄ×ÖÐνṹΪ»ù´¡µÄ


Ïà¹ØÎĵµ£º

CÖÐenumÀàÐͳÉÔ±µÄ²ÎÊý±ä»¯

enumÀàÐ͵ijÉÔ±£¬Ä¬ÈÏÇé¿öÏÂÊÇ´Ó0¿ªÊ¼¸³Öµ£» 
Èç¹ûÖмäij¸ö³ÉÔ±½øÐÐÁËÊÖ¶¯¸³ÖµµÄ»°£¬¸Ã³ÉÔ±µÄÏÂÒ»¸ö³ÉÔ±µÄֵΪ¸Ã³ÉÔ±µÄÖµ+1
#include <stdio.h>
typedef enum {
PLAYMODE = 1, // ĬÈÏ´Ó0¿ªÊ¼
PAUSEMODE,
STOPMODE = 5,
TRACKRPTMODE,
MIXMODE
}Status_t;
int main()
{
int n = 4;
sw ......

C/C++³ÌÐòÄÚ´æ·ÖÅäÏê½â

   
·ÇʱÉСñ2010ÐÂ¿î ¹¬Í¢¸´¹ÅÂÞÂíЬÕæƤÁ¹Ð¬ÊæÊÊƽµ×ЬŮЬ
189.0Ôª 
Ò»¸öÓÉC/C++±àÒëµÄ³ÌÐòÕ¼ÓõÄÄÚ´æ·ÖΪÒÔϼ¸¸ö²¿·Ö
1¡¢Õ»Çø£¨stack£©— ³ÌÐòÔËÐÐʱÓɱàÒëÆ÷×Ô¶¯·ÖÅ䣬´æ·Åº¯ÊýµÄ²ÎÊýÖµ£¬¾Ö²¿±äÁ¿µÄÖµµÈ¡£Æä²Ù×÷·½Ê½ÀàËÆÓÚÊý¾Ý½á¹¹ÖеÄÕ»¡£³ÌÐò½áÊøʱÓɱàÒëÆ÷×Ô¶¯ÊÍ·Å¡£
2¡¢¶ÑÇø£¨h ......

ÈçºÎʹÓ÷ºÐÍÄ£擬virtual? (C/C++) (template)

ÍøÉÏÒ»µÀ½ðɽµÄÃæÊÔÌ⣺
http://topic.csdn.net/u/20100524/14/0eff992a-2849-4db6-bdaa-d4a200e79b7c.html
Çë·Ö±ðÓÃC++µÄÃæÏò¶ÔÏóºÍ·ºÐÍ»úÖÆ£¬±àдʵÏÖTemplate MethodģʽµÄʾÀý´úÂ룬²¢±È½ÏÁ½ÖÖ·½Ê½¸÷×ÔµÄÓÅȱµã¡£
ÓÃÐ麯ÊýʵÏÖTemplate MethodµÄ·½Ê½¾Í²»¶à˵ÁË¡£Ó÷ºÐ͵ķ½Ê½ÊµÏÖ¶à̬ÔÚATLÀïÃæÓдóÁ¿µÄÓõ½£¡
·ºÐ͵ ......

Can C beat RTL?


http://www.edn.com/article/457428-Can_C_beat_RTL_.php 
With the appearance of higher speeds and more DSP macrocells in low-cost FPGAs, more and more design teams are seeing the configurable chips not as glue but as a way to accelerate the inner loops of numerical algorithms, either in conjun ......

»ù±¾ÔËËãµ¥ÔªµÄ¸ß²ã´Î×ۺϣºC/C++ to RTL

±¾ÎÄÒÔ¼Ó·¨ÎªÀý£º[code]
//----------------------------------------------------
//adder.c
//---------------------------------------------------
void adder(int a, int b, int *sum)
{
        *sum = a + b;
}
[/code][size=3]
[/size]
HLS¹¤¾ß£¨AutoPilot£©×ÛºÏÖ®ºóµÄ½á¹ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ