Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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Ô´´úÂë

££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&nbs ......

python udp c/s ¼Ç¼

server:
import sys
import socket
host = sys.argv[1]
port = int(sys.argv[2])
 
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
 
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
 
s.bind((host,port))
 
while 1:
    try:
        message, address = s.recvfrom(100)
        print "Got data from", address, message
 
        #cs = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
        #cs.sendto(message, address)
        #cs.close()
 
        s.sendto(message, address)
 
    except (KeyboardInterrupt, SystemExit):
        raise
    except:
        traceback.print_exc()
client:
import sock ......

python udp c/s ¼Ç¼

server:
import sys
import socket
host = sys.argv[1]
port = int(sys.argv[2])
 
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
 
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
 
s.bind((host,port))
 
while 1:
    try:
        message, address = s.recvfrom(100)
        print "Got data from", address, message
 
        #cs = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
        #cs.sendto(message, address)
        #cs.close()
 
        s.sendto(message, address)
 
    except (KeyboardInterrupt, SystemExit):
        raise
    except:
        traceback.print_exc()
client:
import sock ......

Îĵµ´¦ÀíµÄcº¯Êý

Îļþº¯Êý´ò¿ªÎļþº¯Êý
[º¯ÊýÍ·]
FILE *fopen£¨char *filename, Char *mode£© 
[²ÎÊý]
filename ×Ö·ûÐÍÖ¸Õ룬ָÏòµÄ×Ö·û´®ÊÇÒª´ò¿ªµÄ´ÅÅÌÎļþÃû£»mode ×Ö·ûÐÍÖ¸Õ룬ָÏòµÄ×Ö·û´®ÊÇÎļþʹÓ÷½Ê½¡£ÕâÁ½¸ö²ÎÊý¶ÔÓ¦µÄʵ²Î¿ÉÒÔÊÇ×Ö·ûÖг£Á¿£¬Ò²¿ÉÒÔÊDz¹·ûÊý×éÊ×µØÖ·£¬»òÕßÊÇÖ¸Ïò×Ö·û´®µÄÖ¸Õë±äÁ¿¡£ 
ÎļþʹÓ÷½Ê½¿ÉÒÔÊÇÏÂÁÐ×Ö·û´®£º 
“r”´ò¿ª¸öÒÑ´æÔÚµÄÎı¾Îļþ£¬Ö»ÄܶÁÈ¡Êý¾Ý¡£ 
“w”´ò¿ªÒ»¸öÎı¾Îļþ£¬Ö»ÄÜдÈËÊý¾Ý£»ÈôÎļþ²»´æÔÚ£¬Ôò×Ô¶¯½¨Á¢Ò»¸öÐÂÎļþ½ÓÊÜдÈ˵ÄÊý¾Ý£»ÈôÎļþ´æÔÚ£¬Ôòɾȥ¾ÉÎļþ£¬½¨Á¢Ò»¸öͬÃûÐÂÎļþ£¬½ÓÊÜдÈëµÄÊý¾Ý¡£ 
“a”´ò¿ªÒ»¸öÒÑ´æÔÚµÄÎı¾Îļþ£¬Ö»ÄÜдÈëÊý¾Ý²¢ÇÒ×·¼ÓÔÚÎļþβ²¿¡£ 
“r+”´ò¿ªÒ»¸öÒÑ´æÔÚµÄÎı¾Îļþ£¬¿ÉÒÔ¶ÁÈ¡Êý¾Ý£¬Ò²¿ÉÒÔдÈëÊý¾Ý¡£ 
“w+”´ò¿ªÒ»¸öÎı¾Îļþ£¬¿ÉÒÔ¶ÁÈ¡Êý¾Ý£¬Ò²¿ÉÒÔдÈËÊý¾Ý£»ÈôÎļþ²»´æÔÚ£¬Ôò×Ô¶¯½¨Á¢Ò»¸öÐÂÎļþ½ÓÊÜдÈ˵ÄÊý¾Ý£»ÈôÎļþ´æÔÚ£¬Ôòɾȥ¾ÉÎļþ£¬½¨Á¢Ò»¸öͬÃûÐÂÎļþ£¬½ÓÊÜдÈ˵ÄÊý¾Ý¡£ 
“a+”´ò¿ªÒ»¸öÒÑ´æÔÚµÄÎı¾Îļþ£¬¿ÉÒÔ¶ÁÈ¡Êý¾Ý£¬Ò²¿ÉÒÔдÊý¾Ýµ½Îļþβ²¿¡£ 
ÒÔÉÏ6 ÖÖ·½Ê½¾ù ......

±ê×¼c(c89,c99)Ô­À´²»Ö§³Öȱʡ²ÎÊý

±àÒëÒ»¸öͼÏó½Ó¿Ú¿â£¬ÆäÖÐÓõ½cvSaveImage( out_img_name, img); ±àÒ뱨´í£º
too few arguments to function cvSaveImage
Ò»ÏÂ×ӾͺýÍ¿ÁË£¬´ÓÀ´¶¼ÊÇÕâôÓà cvSaveImage µÄ¡£highgui.hÀïµÄº¯ÊýÔ­ÐÍÒ²ÊǶ¨ÒåÁËȱʡµÄ£¬
CVAPI(int) cvSaveImage(const char*  filename, const CvArr* image, const int* params CV_DEFAULT(0)
);
²éÁËһϣ¬Ô­À´È±Ê¡²ÎÊýÊÇ c++µÄרÀû --- Õⶼ²»ÖªµÀ, º¹¡«¡«¡« ......

20100527 CÏÝÚåÓëȱÏݶÁÊé±Ê¼Ç£¨Ò»¡¢¶þÕ£©

  µÚÒ»Õ£º´Ê·¨“ÏÝÚå”
  ×Öĸ±¾ÉíûÓÐÒâ˼£¬µ«Êǽ«×Öĸ×é³ÉµÄµ¥´Ê¾Í±»¸³ÓèÁËÒâÒå¡£ÔÚCÓïÑÔÖУ¬×Ö·û×éºÏ³ÉÁËÕû¸ö´úÂ룬ÓÉ×Ö·ûÊéд´øÀ´µÄ±ÊÎó»á´øÀ´²»ÉÙÂé·³¡£×÷Ϊ³ÌÐòÔ±£¬²»ÄÜÖ¸Íû¿¿±àÒëÆ÷À´ÌáÐÑ¡£Òò´Ë£¬ÐèҪעÒ⣺
  1.CÓïÑÔÖУ¬·ûºÅÖ®¼äµÄ¿Õ°×£¨°üÀ¨¿Õ¸ñ·û£¬ÖƱí·û£¬»»Ðзû£©½«±»ºöÂÔ¡£
  2.¸³ÖµÓï¾äÊÇ=£¬Ò»¸öµÈºÅ¡£¹ØϵÔËËã“ÏàµÈ”ÊÇ==£¬2¸öµÈºÅ¡£µ±±äÁ¿ºÍ³£Á¿Ïë±È½Ïʱ£¬¿ÉÒÔ½«³£Á¿ÊéдÔÚÇ°Ã棬±ÜÃâÊéд´íÎó¡£
  3.&ÊÇÂß¼­ÔËË㰴λÓ룬&&ÊÇÂß¼­ÔËËãÓ룬|ÊÇÂß¼­ÔËË㰴λ»ò£¬||ÊÇÂß¼­ÔËËã»ò
  4.ΪÁ˱ÜÃâ×Ö·û¶þÒåÐÔ£¬Ó¦¸Ã׼ȷ±í´ï£¬ÀýÈç¿ÉÒÔ¼ÓÈ루£©µÈ¡£ÅжÏÊÇ·ñΪ0ʱ£¬Ò²½«Ìõ¼þдÈë¡£
  5.Èç¹ûÒ»¸öÕûÐγ£Á¿µÄµÚÒ»¸ö×Ö·ûÊÇ0£¬ÄÇô¸Ã³£Á¿±»ÊÓΪ8½øÖÆÊý¡£
  6.Óõ¥ÒýºÅÒýÆðµÄÒ»¸ö×Ö·ûʵ¼ÊÉÏ´ú±íÁËÒ»¸öÕûÊý¡£ÓÃË«ÒýºÅÒýÆðµÄ×Ö·û´®£¬ÊÇÒ»¸öÖ½ÏäÎÞÃûÊý×éÆðʼ×Ö·ûµÄÖ¸Õë¡£
µÚ¶þÕ£ºÓï·¨“ÏÝÚå”
  ÒªÀí½âÒ»¸öC³ÌÐò£¬½ö½öÀí½â×é³É¸Ã³ÌÐòµÄ·ûºÅÊDz»¹»µÄ¡£ÓÐʱºòһЩ¶¨ÓÚÓëÈËÃǵÄÖ±¾õÏà㣣¬»òÕßÈÝÒ×ÒýÆð»ìÏý¡£
  ÈκÎC± ......

C±ê×¼Ô¤¶¨Òåºê

ANSI C±ê×¼ÖÐÓм¸¸ö±ê×¼Ô¤¶¨Òåºê£º__FILE__     __DATE__   __TIME___    __LINE__   µÈ
__LINE__£ºÔÚÔ´´úÂëÖвåÈ뵱ǰԴ´úÂëÐкţ»
__FILE__£ºÔÚÔ´ÎļþÖвåÈ뵱ǰԴÎļþÃû£»
__DATE__£ºÔÚÔ´ÎļþÖвåÈ뵱ǰµÄ±àÒëÈÕÆÚ
__TIME__£ºÔÚÔ´ÎļþÖвåÈ뵱ǰ±àÒëʱ¼ä£»
__STDC__£ºµ±ÒªÇó³ÌÐòÑϸñ×ñÑ­ANSI C±ê׼ʱ¸Ã±êʶ±»¸³ÖµÎª1£»
__cplusplus£ºµ±±àдC++³ÌÐòʱ¸Ã±êʶ·û±»¶¨Òå¡£
Õ⼸¸öºê±È½ÏÓÐÓá«¡«¡«¡«¡«¡«¡«¡«
ÔÚµ÷ÊÔ³ÌÐòʱ»ò±àÒëʱ£¬__LINE__±È½ÏÓÐÓ㬿ÉÒÔÓÃÀ´´òÓ¡Âß¼­´íÎóµÄÐкš«¡«¡«¡«¡«¡«¡«£¬Àý×Ó£º
switch(x)
{
         case 1:
                   ....;
                   break;
         case 2:
                  ......
×ܼǼÊý:2015; ×ÜÒ³Êý:336; ÿҳ6 Ìõ; Ê×Ò³ ÉÏÒ»Ò³ [5] [6] [7] [8] 9 [10] [11] [12] [13] [14]  ÏÂÒ»Ò³ βҳ
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ