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

C¿É±ä²ÎÊýº¯Êý ʵÏÖ

 Cº¯ÊýÒªÔÚ³ÌÐòÖÐÓõ½ÒÔÏÂÕâЩºê:
void va_start( va_list arg_ptr, prev_param );
type va_arg( va_list arg_ptr, type );
void va_end( va_list arg_ptr );
va_list:ÓÃÀ´±£´æºêva_start¡¢va_argºÍva_endËùÐèÐÅÏ¢µÄÒ»ÖÖÀàÐÍ¡£ÎªÁË·ÃÎʱ䳤²ÎÊýÁбíÖеIJÎÊý£¬±ØÐëÉùÃ÷
             va_listÀàÐ͵ÄÒ»¸ö¶ÔÏó       ¶¨Ò壺 typedef char *  va_list;
va_start:·ÃÎʱ䳤²ÎÊýÁбíÖеIJÎÊý֮ǰʹÓõĺ꣬Ëü³õʼ»¯ÓÃva_listÉùÃ÷µÄ¶ÔÏ󣬳õʼ»¯½á¹û¹©ºêva_argºÍ
               va_endʹÓã»
va_arg: Õ¹¿ª³ÉÒ»¸ö±í´ïʽµÄºê£¬¸Ã±í´ïʽ¾ßÓб䳤²ÎÊýÁбíÖÐÏÂÒ»¸ö²ÎÊýµÄÖµºÍÀàÐÍ¡£Ã¿´Îµ÷ÓÃva_arg¶¼»áÐÞ¸Ä
              ÓÃva_listÉùÃ÷µÄ¶ÔÏ󣬴Ӷøʹ¸Ã¶ÔÏóÖ¸Ïò²ÎÊýÁбíÖеÄÏÂÒ»¸ö²ÎÊý£»
va_end:¸Ãºêʹ³ÌÐòÄܹ»´Ó±ä³¤²ÎÊýÁбíÓúêva_startÒýÓõĺ¯ÊýÖÐÕý³£·µ»Ø¡£
vaÔÚÕâÀïÊÇvariable-argument(¿É±ä²ÎÊý)µÄÒâ˼.
ÕâЩºê¶¨ÒåÔÚstdarg.hÖÐ,ËùÒÔÓõ½¿É±ä²ÎÊýµÄ³ÌÐòÓ¦¸Ã°üº¬Õâ¸öÍ·Îļþ.ÏÂÃæÎÒÃÇдһ¸ö¼òµ¥µÄ¿É±ä²ÎÊýµÄº¯Êý,¸Äº¯ÊýÖÁÉÙÓÐÒ»¸öÕûÊý²ÎÊý,µÚ¶þ¸ö²ÎÊýÒ²ÊÇÕûÊý,ÊÇ¿ÉÑ¡µÄ.º¯ÊýÖ»ÊÇ´òÓ¡ÕâÁ½¸ö²ÎÊýµÄÖµ.
#include <stdio.h>;
#include <string.h>;
#include <stdarg.h>;
/* ANSI±ê×¼ÐÎʽµÄÉùÃ÷·½Ê½£¬À¨ºÅÄÚµÄÊ¡ÂԺűíʾ¿ÉÑ¡²ÎÊý */
int demo(char *msg, ... )
{
va_list argp; /* ¶¨Òå±£´æº¯Êý²ÎÊýµÄ½á¹¹ */
int argno = 0; /* ¼Í¼²ÎÊý¸öÊý */
char *para; /* ´æ·ÅÈ¡³öµÄ×Ö·û´®²ÎÊý */

/* argpÖ¸Ïò´«ÈëµÄµÚÒ»¸ö¿ÉÑ¡²ÎÊý£¬ msgÊÇ×îºóÒ»¸öÈ·¶¨µÄ²ÎÊý */
va_start( argp, msg );

while (1)
{
para = va_arg( argp, char *); /* È¡³öµ±Ç°µÄ²ÎÊý£¬ÀàÐÍΪchar *. */
if ( strcmp( para, "\0") == 0 )
/* ²ÉÓÿմ®Ö¸Ê¾²ÎÊýÊäÈë½áÊø */
break;
printf("Parameter #%d is: %s\n", argno, para);
argno++;
}
va_end( argp ); /* ½


Ïà¹ØÎĵµ£º

C/C++——С±à̸CÓïÑÔº¯ÊýÄÇЩÊÂ(8)

C³ÌÐòÊÇÓÉÒ»×é»òÊDZäÁ¿»òÊǺ¯ÊýµÄÍⲿ¶ÔÏó×é³ÉµÄ¡£ º¯ÊýÊÇÒ»¸ö×ÔÎÒ°üº¬µÄÍê³ÉÒ»¶¨Ïà¹Ø¹¦ÄܵÄÖ´ÐдúÂë¶Î¡£ÏÂÃæС±àºÍ´ó¼Ò·ÖÏíÏÂCÓïÑÔÖеĺ¯Êý¡£
 
1.       gcvtº¯Êý
 
gcvtº¯ÊýµÄ¹¦ÄÜÊǰѸ¡µãÊýת»»³É×Ö·û´®£¬ÆäÓ÷¨ÊÇ£ºchar *gcvt(double value, int ndigit, char *buf);³ÌÐò ......

C/C++——С±à̸CÓïÑÔº¯ÊýÄÇЩÊÂ(10)

C³ÌÐòÊÇÓÉÒ»×é»òÊDZäÁ¿»òÊǺ¯ÊýµÄÍⲿ¶ÔÏó×é³ÉµÄ¡£ º¯ÊýÊÇÒ»¸ö×ÔÎÒ°üº¬µÄÍê³ÉÒ»¶¨Ïà¹Ø¹¦ÄܵÄÖ´ÐдúÂë¶Î¡£ÏÂÃæС±àºÍ´ó¼Ò·ÖÏíÏÂCÓïÑÔÖеĺ¯Êý¡£
 
1. initgraphº¯Êý
initgraphº¯ÊýÊdzõʼ»¯Í¼ÐÎϵͳ£¬ÆäÓ÷¨Îª£ºvoid far initgraph(int far *graphdriver, int far *graphmode,char far *pathtodriver); ³ÌÐòÀý×ÓÈçÏ£ ......

Symbian C/S »úÖÆ·ÖÎö

 
ÒÔÏ·ÖÎö»ùÓÚ£º
Developer Platform :S60 3rd Edition, Feature Pack 2 SDK
Operating System :Symbian OS v9.3
Ò»£¬ÎªÊ²Ã´ÒªÊ¹ÓÃClient/Server¼Ü¹¹
ÔÚSymibian OSÖÐËùÓеÄÒì²½·þÎñ¶¼ÊÇServerͨ¹ýC/S¼Ü¹¹À´ÊµÏֵġ£ClientÊÇÀûÓÃServerÌṩµÄÌض¨·þÎñµÄ³ÌÐò£¬Server½ÓÊÜÀ´ÖÁClientµÄÇëÇóÏûÏ¢²¢Í¬²½»òÒì²½µ ......

CÎļþÖÐÒýÓÃCPPÎļþʱµÄÎÊÌâ


unzip.c
ÖÐÒýÓÃvalidate.cpp
ÎļþÖеĺ¯ÊýÀ´½øÐÐepub
¾À´í£¬²úÉúµÄÎÊÌ⣺
1.    
validate.cpp
ÖÐʹÓÃiostream.h,
µ«ÊÇC
ÖÐûÓÐÕâ¸öÎļþ
£¬ËùÒÔ²úÉúµÄ´íÎó£º
2>
ÕýÔÚ±àÒë...
2>unzip.c
2>D:\Program
Files\VC\include\cstdio(25) : error C2143:
Óï·¨´íÎó:
ȱÉÙ“{ ......

CºÍC++»ìºÏ±à³Ì(__cplusplusʹÓÃ)


µÚÒ»ÖÖÀí½â
±ÈÈç˵ÄãÓÃC++¿ª·¢ÁËÒ»¸öDLL¿â£¬ÎªÁËÄܹ»ÈÃCÓïÑÔÒ²Äܹ»µ÷ÓÃÄãµÄDLLÊä³ö(Export)µÄº¯Êý£¬ÄãÐèÒªÓÃextern "C"À´Ç¿ÖƱàÒëÆ÷²»ÒªÐÞ¸ÄÄãµÄ
º¯ÊýÃû¡£
ͨ³££¬ÔÚCÓïÑÔµÄÍ·ÎļþÖо­³£¿ÉÒÔ¿´µ½ÀàËÆÏÂÃæÕâÖÖÐÎʽµÄ´úÂ룺
#ifdef __cplusplus
extern "C" {
#endif
/**** some declaration or so *****/
#ifde ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ