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·Ö
}
Ïà¹ØÎĵµ£º
1.ÇóÏÂÃæº¯ÊýµÄ·µ»ØÖµ£¨Î¢Èí£©
¡¡¡¡int func(x)
¡¡¡¡{
¡¡¡¡int countx = 0;
¡¡¡¡while(x)
¡¡¡¡{
¡¡¡¡countx ++;
¡¡¡¡x = x&(x-1);
¡¡¡¡}
¡¡¡¡return countx;
¡¡¡¡}
¡¡¡¡¼Ù¶¨x = 9999¡£ ´ð°¸£º8
¡¡¡¡Ë¼Â·£º½«xת»¯Îª2½øÖÆ£¬¿´º¬ÓеÄ1µÄ¸öÊý¡£
¡¡¡¡2. ʲôÊÇ“ÒýÓÔ£¿ÉêÃ÷ºÍʹÓÓÒýÓ ......
н¨Ò»¸öWin32 Application£¬²¢ÔÚÏàÓ¦Îļþ¼ÐÏÂн¨Ò»¸öbook.mdb£¬ ÀïÃæÓÐÒ»¸ö±íBookInfo£¬±íÖÐÓÐÒÔϼ¸Àý£º
id:
BookName:
Author:
µÈ£»
//------------------------------------------------------------------------------
// Copyright (c) 2009 eryar All rights reserved.
//
// File : Main.cpp
// ......
LinuxÏÂCÓïÑÔ±à³Ì»ù´¡(Makefile)
2005-01-18 10:28:23 À´×Ô£ºÈüµÏÍø
¼ÙÉèÎÒÃÇÓÐÏÂÃæÕâÑùµÄÒ»¸ö³ÌÐò£¬Ô´´úÂëÈçÏ£º
/* main.c */
#include "mytool1.h"
#include "mytool2.h"
int main(int argc£¬char **argv)
{
mytool1_print("hello")£»
mytool2_print(&q ......
½ñÌì½â´ðһЩͬѧÔÚѧ¿ª·¢¹ý³ÌÖÐµÄÆÕ±éÎÊÌâ,¾ÍÊÇÈçºÎѧºÃÒ»ÃÅÓïÑÔ?
ÎÒÊÇÕâÑùÀ´Àí½âµÄ,Òª×öÈκÎÊÂÎï,Ê×ÏÈÒª·ÖÎöΪʲôҪ×ö,Ö»ÓаѺËÐĵÄ,ÄÚÐĵÄÔÒòÕÒµ½²ÅÄܰÑÒ»¼þÊÂÇé×öºÃ,·ñÔò,Ä㻨ÔÙ¶àµÄѧ·ÑѧijÖÖ¼¼ÊõÈÔÈ»»áÒ»ÎÞËù»ò,´ÓÎÒ¸öÈ˵ijɳ¤¹ý³ÌÀ´½«ÎÒÊÇ´Ó97Äê½Ó´¥¼ÆËã»ú,¿ªÊ¼Ñ§µÄһ̤ºýÍ¿,²»ÖªµÀÀÏʦÔÚ½²Ê²Ã´,²»ÖªµÀѧÁË»áÓÐʲ ......
ÍøÉÏ¿´µ½µÄÕâÆª¹ØÓÚLinuxÏÂCÓïÑÔǶÈë»ã±àµÄÎÄÕÂдµÄ·Ç³£È«£¬×ªÔعýÀ´¡£
Using Assembly Language in Linux.
IntelºÍAT&T»ã±àÓï·¨²îÒ죺
1¡£Ç°×º£º
Intel»ã±à¼Ä´æÆ÷ºÍÁ¢¼´ÊýÎÞÐèǰ׺¡£ºóÕ߼ĴæÆ÷ǰ׺Ϊ%£¬Á¢¼´Êýǰ׺Ϊ$¡£
eg£º
Intex Syntax
mov eax,1
mov ebx,0f ......