c/c++¾µäÃæÊÔÊÔÌâ¼°±ê×¼´ð°¸
¾¹ý¼¸´ÎÃæÊÔ£¬·¢ÏÖ±ÊÊÔÌâ»ù±¾É϶¼ÊÇÄǼ¸µÀ£¬Ã»ÓÐʲô´´Ð»òÕ߸ı䣬×ܽá³öÀ´¸ø´ó¼Ò²Î¿¼²Î¿¼.
Ò»¡¢ÇëÌîдBOOL , float, Ö¸Õë±äÁ¿Óë“ÁãÖµ”±È½ÏµÄ if Óï¾ä¡££¨10·Ö£©
Çëд³ö BOOL flag Óë“ÁãÖµ”±È½ÏµÄ if Óï¾ä¡££¨3·Ö£©
±ê×¼´ð°¸£º
if ( flag )
if ( !flag )
ÈçÏÂд·¨¾ùÊô²»Á¼·ç¸ñ£¬²»µÃ·Ö¡£
if (flag == TRUE)
if (flag == 1 )
if (flag == FALSE)
if (flag == 0)
Çëд³ö float x Óë“ÁãÖµ”±È½ÏµÄ if Óï¾ä¡££¨4·Ö£©
±ê×¼´ð°¸Ê¾Àý£º
const float EPSINON = 0.00001;
if ((x >= - EPSINON) && (x <= EPSINON)
²»¿É½«¸¡µã±äÁ¿ÓÓ==”»ò“£¡=”ÓëÊý×ֱȽϣ¬Ó¦¸ÃÉ跨ת»¯³É“>=”»ò“<=”´ËÀàÐÎʽ¡£
ÈçÏÂÊÇ´íÎóµÄд·¨£¬²»µÃ·Ö¡£
if (x == 0.0)
if (x != 0.0)
Çëд³ö char *p Óë“ÁãÖµ”±È½ÏµÄ if Óï¾ä¡££¨3·Ö£©
±ê×¼´ð°¸£º
if (p == NULL)
if (p != NULL)
ÈçÏÂд·¨¾ùÊô²»Á¼·ç¸ñ£¬²»µÃ·Ö¡£
if (p == 0)
if (p != 0)
if (p)
if (!)
¶þ¡¢ÒÔÏÂΪWindows NTϵÄ32λC++³ÌÐò£¬Çë¼ÆËãsizeofµÄÖµ£¨10·Ö£©
char str[] = “Hello” ;
char *p = str ;
int n = 10;
Çë¼ÆËã
sizeof (str ) = 6 £¨2·Ö£©
sizeof ( p ) = 4 £¨2·Ö£©
sizeof ( n ) = 4 £¨2·Ö£©
void Func ( char str[100])
{
Çë¼ÆËã
sizeof( str ) = 4 £¨2·Ö£©
}
void *p = malloc( 100 );
Çë¼ÆËã
sizeof ( p ) = 4 £¨2·Ö£©
Èý¡¢¼ò´ðÌ⣨25·Ö£©
1¡¢Í·ÎļþÖÐµÄ ifndef/define/endif ¸ÉʲôÓã¿£¨5·Ö£©
´ð£
Ïà¹ØÎĵµ£º
ÕâÊÇÒ»¸öÓÃJAVA W3C DOM ½øÐÐXML²Ù×÷µÄÀý×Ó£¬°üº¬Á˲éѯ¡¢Ôö¼Ó¡¢Ð޸ġ¢É¾³ý¡¢±£´æµÄ»ù±¾²Ù×÷¡£½ÏÍêÕûµÄÃèÊöÁËÒ»¸öXMLµÄÕû¸ö²Ù×÷Á÷³Ì¡£ÊʺϸÕÈëÃÅJAVA XML²Ù×÷µÄÅóÓѲο¼ºÍѧϰ¡£
¼ÙÉèÓÐXMLÎļþ£ºtest1.xml
<?xml version="1.0" encoding="UTF-8"?>
<books>
<book>
<name>¹þÀï²¨Ì ......
ÓÉÓÚÒª²âϵͳµÄCPUÊôÐÔ£¬ÐèÒª¶ÀÁ¢±àÒëÓ¦ÓóÌÐò£¬±ãÊÔÁËϱàÒë´¿C ³ÌÐò£¬²âÊÔͨ¹ý¡£
CC := $(NDK_BASE)/toolchain/arm-eabi/bin/arm-eabi-gcc
AR := $(NDK_BASE)/toolchain/arm-eabi/bin/arm-eabi-ar
INC & ......
1¡¢¿ìËÙ³õʼ»¯
char *str = new [size];
str[0]='\0';
2¡¢memcpyµÄÃîÓÃ
ÊÔÌâ6£ºÒÑÖªWAVÎļþ¸ñʽÈçÏÂ±í£¬´ò¿ªÒ»¸öWAVÎļþ£¬ÒÔÊʵ±µÄÊý¾Ý½á¹¹×éÖ¯WAVÎļþÍ·²¢½âÎöWAV¸ñʽµÄ¸÷ÏîÐÅÏ¢¡£
WAVEÎļþ¸ñʽ˵Ã÷±í
Æ«ÒƵØÖ· ×Ö½ÚÊý Êý¾ÝÀàÐÍ ÄÚ ÈÝ
ÎļþÍ·
00H 4 Char "RIFF"±êÖ¾
......
¡¡¡¡Óû§Ê¹ÓÃGhostÖØװϵͳ£¬¾³£³öÏÖ C D E F ...¶à¸ö·ÖÇø ±ä³ÉÒ»¸ö C·ÖÇø£¬Ôì³ÉÊý¾Ý¶ªÊ§£¬Õâʱ¾ÍÐèÒªÊý¾Ý»Ö¸´¹¤×÷¡£
¡¡¡¡ËäÈ»Õû¸öÓ²Å̱ä³ÉÁËÒ»¸ö·ÖÇø£¬µ«Í¨¹ýÊý¾Ý»Ö¸´¼¼Êõ¿ÉÒÔÊdzýÔÀ´µÄC·ÖÇøÍ⣬ÆäËü´ÅÅÌ·ÖÇøµÄÊý¾Ý¶¼Äܱ»»Ö¸´¡£
ÏÂÃæÎÒÃÇÀ´¿´ÈçºÎÀ´»Ö¸´£º
ÕâÀïÎ ......
ÔÚ±à³ÌµÄ¹ý³ÌÖУ¬ÎļþµÄ²Ù×÷ÊÇÒ»¸ö¾³£Óõ½µÄÎÊÌ⣬ÔÚC++BuilderÖУ¬¿ÉÒÔʹÓöàÖÖ·½·¨¶ÔÎļþ²Ù×÷£¬ÏÂÃæÎҾͰ´ÒÔϼ¸¸ö²¿·Ö¶Ô´Ë×÷Ïêϸ½éÉÜ£¬¾ÍÊÇ£º
1¡¢»ùÓÚCµÄÎļþ²Ù×÷£»
2¡¢»ùÓÚC++µÄÎļþ²Ù×÷£»
3¡¢»ùÓÚWINAPIµÄÎļþ²Ù×÷£»
4¡¢»ùÓÚBCB¿âµÄÎļþ²Ù×÷£»
5¡¢ÌØÊâÎļþµÄ²Ù×÷¡£
¡¡
Ò¼¡¢»ùÓÚCµÄÎļþ²Ù×÷
¡¡¡¡ÔÚANSI CÖУ¬ ......