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

c ×Ö·û´®´¦Àíº¯Êý strtok Ô´Âë

/***
*strtok.c - tokenize a string with given delimiters
*
* Copyright (c) Microsoft Corporation. All rights reserved.
*
*Purpose:
* defines strtok() - breaks string into series of token
* via repeated calls.
*
*******************************************************************************/
#include
#include
#ifdef _SECURE_VERSION
#include
#else /* _SECURE_VERSION */
#include
#endif /* _SECURE_VERSION */
/***
*char *strtok(string, control) - tokenize string with delimiter in control
*
*Purpose:
* strtok considers the string to consist of a sequence of zero or more
* text tokens separated by spans of one or more control chars. the first
* call, with string specified, returns a pointer to the first char of the
* first token, and will write a null char into string immediately
* following the returned token. subsequent calls with zero for the first
* argument (string) will work thru the string until no tokens remain. the
* control string may be different from call to call. when no tokens remain
* in string a NULL pointer is returned. remember the control chars with a
* bit map, one bit per ascii char. the null char is always a control char.
*
*Entry:
* char *string - string to tokenize, or NULL to get next token
* char *control - string of characters to use as delimiters
*
*Exit:
* returns pointer to first token in string, or if string
* was NULL, to next token
* returns NULL when no more tokens remain.
*
*Uses:
*
*Exceptions:
*
*******************************************************************************/
#ifdef _SECURE_VERSION
#define _TOKEN *context
#else /* _SECURE_VERSION */
#define _TOKEN ptd->_token
#endif /* _SECURE_VERSION */
#ifdef _SECURE_VERSION
char * __cdecl strtok_s (
char * string,
const char * control,
char ** context
)
#else /* _SECURE_VERSION */
char *


Ïà¹ØÎĵµ£º

c Óë c£«£«ÖеÄtimeÏà¹Øº¯Êý

  ±¾ÎÄ´Ó½éÉÜ»ù´¡¸ÅÄîÈëÊÖ£¬Ì½ÌÖÁËÔÚC/C++ÖжÔÈÕÆÚºÍʱ¼ä²Ù×÷ËùÓõ½µÄÊý¾Ý½á¹¹ºÍº¯Êý£¬²¢¶Ô¼ÆÊ±¡¢Ê±¼äµÄ»ñÈ¡¡¢Ê±¼äµÄ¼ÆËãºÍÏÔʾ¸ñʽµÈ·½Ãæ½øÐÐÁ˲ûÊö¡£±¾ÎÄ»¹Í¨¹ý´óÁ¿µÄʵÀýÏòÄãչʾÁËtime.hÍ·ÎļþÖÐÉùÃ÷µÄ¸÷ÖÖº¯ÊýºÍÊý¾Ý½á¹¹µÄÏêϸʹÓ÷½·¨¡£
    ¹Ø¼ü×Ö£ºUTC£¨ÊÀ½ç±ê׼ʱ¼ä£©£¬Calendar Time£¨ ......

ÖØÐÂʰÆðC£¨Ò»£©

    µÚÒ»¸öÎÊÌ⣬°ÙÇ®°Ù¼¦£¬囧µ½ÁË
#include<stdio.h>
void main()
{
int cocks=0,hens=0,chicks=0;
while(cocks<=19)
{
while(hens<=33)
{
chicks=100-cocks-hens;
if((cocks+hens+chicks==100)&&(cocks*5+hens*3+chicks/3==100))
printf("cocks= ......

cÖеÄÒ°Ö¸Õë

¶ÔÒ°Ö¸ÕëµÄһЩÈÏʶ£º
 
ÎÒ¶ÔÒ°Ö¸ÕëµÄÈÏʶ£¬ÎÒ¾õµÃÒ°Ö¸Õë¾ÍÊÇÒ»¸öÖ¸Õë±äÁ¿ËüÀïÃæµÄÖµÊDz»È·¶¨µÄ£¬ÕâÑùµ±Äã²Ù×÷Õâ¸ö±äÁ¿ËùÖ¸¶¨µÄÄÚ´æµØÖ·µÄʱºò£¬¾Í»á´øÀ´Ò»Ð©²»È·¶¨µÄÒòËØ£¬ÄÃÒ»¸ö±È½Ï³£¼ûµÄÎÊÌâÀ´¾Ù¸öÀý×ÓÀ´ËµÃ÷һϣº
¿´ÏÂÃæ´úÂ룺
 
int a = 10;
int *p;
*p = a;

1.      ......

C Ô¤¶¨ÒåµÄºê

 C±ê×¼ÖÐÖ¸¶¨ÁËһЩԤ¶¨ÒåµÄºê£¬¶ÔÓÚ±à³Ì¾­³£»áÓõ½¡£ÏÂÃæÕâ¸ö±íÖоÍÊÇһЩ³£³£Óõ½µÄÔ¤¶¨Òåºê¡£
__DATE__
½øÐÐÔ¤´¦ÀíµÄÈÕÆÚ£¨“Mmm dd yyyy”ÐÎʽµÄ×Ö·û´®ÎÄ×Ö£©
__FILE__
´ú±íµ±Ç°Ô´´úÂëÎļþÃûµÄ×Ö·û´®ÎÄ×Ö
__LINE__
´ú±íµ±Ç°Ô´´úÂëÖеÄÐкŵÄÕûÊý³£Á¿
__TIME__
Ô´Îļþ±àÒëʱ¼ä£¬¸ñʽ΢“hh£ ......

c°æ±¾Óëc++°æ±¾µÄ¶¯Ì¬Êý×é´úÂë

C°æ±¾£º
vim stash.h
#ifndef STASH_H
#define STASH_H
typedef struct STASHTag {
  int size;  /* Size of each space */
  int quantity; /* Number of storage spaces */
  int next; /* Next empty space */
  /* Dynamically allocated array of bytes: */
  unsigned char* ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ