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

¶íÂÞ˹·½¿écÔ´´úÂë

££i nclude <stdio.h>
££i nclude <dos.h>
££i nclude <conio.h>
££i nclude <graphics.h>
££i nclude <stdlib.h>
#ifdef __cplusplus 
#define __CPPARGS ...
#else
#define __CPPARGS
#endif
#define MINBOXSIZE 15 /* ×îС·½¿éµÄ³ß´ç */
#define BGCOLOR 7 /* ±³¾°×ÅÉ« */
#define GX 200
#define GY 10
#define SJNUM 10000 /* Ã¿µ±Íæ¼Ò´òµ½Ò»Íò·ÖµÈ¼¶¼ÓÒ»¼¶*/
/* °´¼üÂë*/
#define VK_LEFT 0x4b00
#define VK_RIGHT 0x4d00
#define VK_DOWN 0x5000
#define VK_UP 0x4800
#define VK_HOME 0x4700
#define VK_END 0x4f00
#define VK_SPACE 0x3920
#define VK_ESC 0x011b
#define VK_ENTER 0x1c0d
/* ¶¨Òå¶íÂÞ˹·½¿éµÄ·½Ïò£¨ÎÒ¶¨ÒåËûΪ4ÖÖ£©*/
#define F_DONG 0
#define F_NAN 1
#define F_XI 2
#define F_BEI 3
#define NEXTCOL 20 /* Òª³öµÄÏÂÒ»¸ö·½¿éµÄ×Ý×ø±ê*/
#define NEXTROW 12 /* Òª³öµÄÏÂÒ»¸ö·½¿éµÄºá´Ó±ê*/
#define MAXROW 14 /* ÓÎÏ·ÆÁÄ»´óС*/
#define MAXCOL 20
#define SCCOL 100 /*ÓÎÏ·ÆÁÄ»´óÏÔʾÆ÷ÉϵÄÏà¶ÔλÖÃ*/
#define SCROW 60
int gril[22][16]; /* ÓÎÏ·ÆÁÄ»×ø±ê*/
int col=1,row=7; /* µ±Ç°·½¿éµÄºá×Ý×ø±ê*/
int boxfx=0,boxgs=0; /* µ±Ç°Ë¿éµÄÐÎ׳ºÍ·½Ïò*/
int nextboxfx=0,nextboxgs=0,maxcol=22;/*ÏÂÒ»¸ö·½¿éµÄÐÎ׳ºÍ·½Ïò*/
int minboxcolor=6,nextminboxcolor=6;
int num=0; /*ÓÎÏ··Ö*/
int dj=0,gamedj[10]={18,16,14,12,10,8,6,4,2,1};/* ÓÎÏ·µÈ¼¶*/
/* ÒÔÏÂÎÒÓÃÁËÒ»¸ö3άÊý×éÀ´¼Í¼·½¿éµÄ×î³õÐÎ×´ºÍ·½Ïò*/
int boxstr[7][4][16]={{
{1,1,0,0,0,1,1,0,0,0,0,0,0,0,0,0},
{0,1,0,0,1,1,0,0,1,0,0,0,0,0,0,0},
{1,1,0,0,0,1,1,0,0,0,0,0,0,0,0,0},
{0,1,0,0,1,1,0,0,1,0,0,0,0,0,0,0}},
{
{0,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0},
{1,0,0,0,1


Ïà¹ØÎĵµ£º

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 ......

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£©×ÛºÏÖ®ºóµÄ½á¹ ......

Linux C ʵÏÖÏ̳߳Ø

×î½ü×öµÄһЩ¹¤×÷ÐèÒªÓõ½Ï̳߳ؼ¼Êõ£¬Òò´Ë²Î¿¼ÁËһЩ×ÊÁϺÍÊé¼®£¬Èç¡¶0bug c/c++ÉÌÓù¤³ÌÖ®µÀ¡·¡£
Ϊ´ËÔÚlinuxƽ̨ÉÏÓô¿cдÁËÒ»¸öÏ̳߳صÄʵÏÖ¡£
ÔÚ´ËÁгöÁËÔ­´úÂë¡£
Ö÷ÒªÓõ½µÄÊý¾Ý½á¹¹ÓÐ
1.struct  thread_pool_t    // thread pool µÄʵÏÖ´úÂë
2.struct thread_pool_token_t  &nb ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ