4*4¼üÅÌɨÃèC³ÌÐò
4*4¼üÅÌɨÃèC³ÌÐò
#include<reg52.h>
#define uchar unsigned char
uchar code table[]={0xC0,0xF9,0xA4,0xB0,0x99,
0x92,0x82,0xF8,0x80,0x90,
0x88,0x83,0xC6,0xA1,0x86,0x8E};
uchar temp,num;
void display(uchar);
void delay(uchar a)
{
uchar b;
for(;a>0;a--)
for(b=200;b>0;b--);
}
void main()
{
while(1)
{
P2=0x7f;
temp=P2;
temp&=0x0f;
if(temp!=0x0f)
{
delay(50);
if(temp!=0x0f)
{
switch(temp)
{
case 0x07: num="0"; break;
case 0x0b: num="1"; break;
case 0x0d: num="2"; break;
case 0x0e: num="3"; break;
}
}
}
P2=0xbf;
temp=P2;
temp&=0x0f;
if(temp!=0x0f)
{
delay(50);
if(temp!=0x0f)
{
switch(temp)
{
case 0x07: num="4"; break;
case 0x0b: num="5"; break;
case 0x0d: num="6"; break;
case 0x0e: num="7"; break;
}
}
}
P2=0xdf;
temp=P2;
temp&=0x0f;
if(temp!=0x0f)
{
delay(50);
if(temp!=0x0f)
{
switch(temp)
{
case 0x07: num="8"; break;
case 0x0b: num="9"; break;
case 0x0d: num="10"; break;
case 0x0e: num="11"; break;
}
}
}
P2=0xef;
temp=P2;
temp&=0x0f;
if(temp!=0x0f)
{
delay(50);
if(temp!=0x0f)
{
switch(temp)
{
&nb
Ïà¹ØÎĵµ£º
ÈÃÎÒÃÇ´ÓÒ»¸ö·Ç³£¼òµ¥µÄÀý×Ó¿ªÊ¼£¬ÈçÏ£º
int n;
Õâ¸öÓ¦¸Ã±»Àí½âΪ“declare n as an int”£¨nÊÇÒ»¸öintÐ͵ıäÁ¿£©¡£
½ÓÏÂÈ¥À´¿´Ò»ÏÂÖ¸Õë±äÁ¿£¬ÈçÏ£º
int *p;
Õâ
¸öÓ¦¸Ã±»Àí½âΪ“declare p as an int *”£¨pÊÇÒ»¸öint
*Ð͵ıäÁ¿£©£¬»òÕß˵pÊÇÒ»¸öÖ¸ÏòÒ»¸öintÐͱäÁ¿µÄÖ¸Õë¡£ÎÒÏëÔÚÕ ......
1.ÒýÑÔ
¡¡¡¡±¾ÎĵÄд×÷Ä¿µÄ²¢²»ÔÚÓÚÌṩC/C++³ÌÐòÔ±ÇóÖ°ÃæÊÔÖ¸µ¼£¬¶øÖ¼ÔÚ´Ó¼¼ÊõÉÏ·ÖÎöÃæÊÔÌâµÄÄÚº¡£ÎÄÖеĴó¶àÊýÃæÊÔÌâÀ´×Ô¸÷´óÂÛ̳£¬²¿·ÖÊÔÌâ½â´ðÒ²²Î¿¼ÁËÍøÓѵÄÒâ¼û¡£
¡¡¡¡Ðí¶àÃæÊÔÌâ¿´ËÆ¼òµ¥£¬È´ÐèÒªÉîºñµÄ»ù±¾¹¦²ÅÄܸø³öÍêÃÀµÄ½â´ð¡£ÆóÒµÒªÇóÃæÊÔÕßдһ¸ö×î¼òµ¥µÄstrcpyº¯Êý¶¼¿É¿´³öÃæÊÔÕßÔÚ¼¼ÊõÉϾ¿¾¹´ïµ½ÁËÔõÑù ......
C/S½á¹¹£¬¼´Client/Server(¿Í»§»ú/·þÎñÆ÷)½á¹¹£¬ÊÇ´ó¼ÒÊìÖªµÄÈí¼þϵͳÌåϵ½á¹¹£¬Í¨¹ý½«ÈÎÎñºÏÀí·ÖÅäµ½Client¶ËºÍServer¶Ë£¬½µµÍÁËϵͳµÄͨѶ¿ªÏú£¬¿ÉÒÔ³ä·ÖÀûÓÃÁ½¶ËÓ²¼þ»·¾³µÄÓÅÊÆ¡£ÔçÆÚµÄÈí¼þϵͳ¶àÒÔ´Ë×÷ΪÊ×Ñ¡Éè¼Æ±ê×¼¡£
B/S½á¹¹£¬¼´Browser/Server(ä¯ÀÀÆ÷/·þÎñÆ÷)½á¹¹£¬ÊÇËæ×ÅInternet¼¼ÊõµÄÐËÆð£¬¶ÔC/S½á¹¹µÄÒ»Öֱ仯 ......
ÏîÄ¿ÖÐÒªÓõ½Ò»¸öÄ£¿é¡£¿´ÁËϸÃÄ£¿éµÄÓ÷¨£¬¾ÍÒÀºù«»Æ°µÄ°áµ½×Ô¼ºµÄ´úÂëÀïÃæÀ´ÁË¡£²»¹ýÔÚ±àÒëµÄʱºòÅöµ½ÁËÂé·³£¬ ÔÚ³ÌÐòÁ´½ÓµÄʱºò³ö´í£º“undefined reference to***",Ó¦¸ÃÊÇÒòΪûÓаüº¬ÏàÓ¦µÄ¿âÎļþ°É¡£
ÓÚÊDZȽÏÁËmake fileÎļþµÄд·¨£¬ÊÔͼÔÚÎÒÕâ±ß ......
¸ù±¾ÔÒòÔÚÓë×óÖµºÍÓÒÖµ
char a[10]=“hello”;
sizeof(a);//Êý×éÃû×ö×óÖµ£¬¾ßÓÐÊý×éÃûµÄÊôÐÔ£¬ÊÇÒ»¸öÖ¸ÏòÊý×éÊ×µØÖ·µÄ³£Á¿Ö¸Õë
strcpy(a,"abc");//Êý×éÃû×öÓÒÖµ£¬ÍË»¯ÎªÆÕͨµÄÖ¸Õë
ÔÎÄÁ´½Ó£º
http://hi.baidu.com/%D2%C0%BD%A3%D0%F9/blog/item/7bbf36966c92f36a54fb9663.html
×÷ÕߣºËᦻª e ......