C³£Óú¯Êý
¼ì²é¿Õ¸ñ×Ö·û
#include <ctype.h>
int isspace ( int c );
http://www.cplusplus.com/reference/clibrary/cctype/isspace/
Checks if parameter c is a white-space character.For the purpose of this function, standard white-space characters are:
' '
(0x20)
space (SPC)
'\t'
(0x09)
horizontal tab (TAB)
'\n'
(0x0a)
newline (LF)
'\v'
(0x0b)
vertical tab (VT)
'\f'
(0x0c)
feed (FF)
'\r'
(0x0d)
carriage return (CR)
/* isspace example */
#include <stdio.h>
#include <ctype.h>
int main ()
{
int c;
int i=0;
char str[]="Example sentence to test isspace\n";
while (str[i])
{
c=str[i];
if (isspace(c)) c='\n';
putchar (c);
i++;
}
return 0;
}
/*
This code prints out the C string character by character, replacing any white-space character by a newline character. Output:
Example
sentence
to
test
isspace
*/
memcpyʵÏÖ£º
char *strcpy(char *strDest, const char *strSrc){
assert((strDest!=NULL) && (strSrc !=NULL)); // 2·Ö
char *address = strDest; // 2·Ö
while( (*strDest++ = * strSrc++) != '\0' ) // 2·Ö
NULL ;
return address ; // 2·Ö
}
Ïà¹ØÎĵµ£º
#include <stdio.h>
#include <unistd.h>
#define FOO "foo"
int main(void)
{
if(!access(FOO, F_OK))
{
if(!unlink(FOO))
{
}
else
{
printf("remove %s failed\n", FOO);
}
}
else
{
printf("%s not existed\ ......
ÒýÑÔ
¡¡¡¡Ö¸ÕëÊÇC/C++ÓïÑÔµÄÌØÉ«£¬¶øÊý×éÃûÓëÖ¸ÕëÓÐÌ«¶àµÄÏàËÆ£¬ÉõÖÁºÜ¶àʱºò£¬Êý×éÃû¿ÉÒÔ×÷ΪָÕëʹÓá£ÓÚÊǺõ£¬ºÜ¶à³ÌÐòÉè¼ÆÕ߾ͱ»¸ãºýÍ¿ÁË¡£¶øÐí¶àµÄ´óѧÀÏʦ£¬ËûÃÇÔÚCÓïÑԵĽÌѧ¹ý³ÌÖÐÒ²´íÎóµÃ¸øÑ§Éú½²½â£º"Êý×éÃû¾ÍÊÇÖ¸Õë"¡£ºÜÐÒÔË£¬ÎҵĴóѧÀÏʦ¾ÍÊÇÆäÖÐÖ®Ò»¡£Ê±ÖÁ½ñÈÕ£¬ÎÒÈÕ¸´Ò»ÈյؽøÐÐ×ÅC/C++ÏîÄ¿µÄ¿ª·¢£¬¶ ......
ѧϰCÓïÑÔʱ£¬ÓÃ×Ö·û´®µÄº¯ÊýÀýÈçstpcpy()¡¢strcat()¡¢strcmp()µÈ£¬Òª°üº¬Í·Îļþstring.h
ѧϰC++ºó£¬C++ÓÐ×Ö·û´®µÄ±ê×¼Ààstring£¬stringÀàÒ²Óкܶ෽·¨£¬ÓÃstringÀàʱҪÓõ½string.hÍ·Îļþ¡£
ÎÒÏÖÔÚ¿´vcµÄÊéÉÏÒ²ÓÐCStringÀ࣬Õâ¸öÒª°üº¬Ê²Ã´£¬ÔõôÓÃ?
ÎÒÏÖÔÚºÜÃÔ»ó£¬ÕâÁ½¸ö string.hÓÐÊ²Ã´Çø±ð¡£ÊÇÔõô»ØÊÂ
ÇÒ¿´ ......
½ñÌì½â´ðһЩͬѧÔÚѧ¿ª·¢¹ý³ÌÖÐµÄÆÕ±éÎÊÌâ,¾ÍÊÇÈçºÎѧºÃÒ»ÃÅÓïÑÔ?
ÎÒÊÇÕâÑùÀ´Àí½âµÄ,Òª×öÈκÎÊÂÎï,Ê×ÏÈÒª·ÖÎöΪʲôҪ×ö,Ö»ÓаѺËÐĵÄ,ÄÚÐĵÄÔÒòÕÒµ½²ÅÄܰÑÒ»¼þÊÂÇé×öºÃ,·ñÔò,Ä㻨ÔÙ¶àµÄѧ·ÑѧijÖÖ¼¼ÊõÈÔÈ»»áÒ»ÎÞËù»ò,´ÓÎÒ¸öÈ˵ijɳ¤¹ý³ÌÀ´½«ÎÒÊÇ´Ó97Äê½Ó´¥¼ÆËã»ú,¿ªÊ¼Ñ§µÄһ̤ºýÍ¿,²»ÖªµÀÀÏʦÔÚ½²Ê²Ã´,²»ÖªµÀѧÁË»áÓÐʲ ......
Ò»Ö±¶¼¸Ðµ½ºÜÃÔ㣬¶ÔÓÚÓïÑÔµÄÑ¡Ôñ£¬ÒòΪ»¹ÊDzËÄñµÄÔÒò£¬ÎÞ·¨¿´Í¸ÀïÃæµÄÖÖÖÖ¹ØÏµ£¬Ò»Ö±ÔÚ¾À½áÆäÖС£Æäʵ×Ô¼ºÒ²Ã÷°×“´óµÀÖÁ¼ò”£¬µ«»¹Êǰ´ÄͲ»×¡¿ñÏëµÄ˼Ð÷£¬ÌرðÊǵ±´Ó¹«Ë¾³ö²î»ØÀ´Ö®ºó£¬¼¸Ì춼ûÓÐ×öʲôÊÂÇé¡£
¶ÔCÓÐÒ»ÖÖÆ«ºÃ£¬ËùÒÔÒ»Ö±ÔÚÐÄÀï¾ÍÓеãÅųâjava¡£ËäÈ»javaÖÐÒ²ÓкܶණÎ÷Ҫѧ£¬µ«ÊÇDZÒâʶÀïÃæ¶ÔÕ ......