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

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·Ö£©
´ð£


Ïà¹ØÎĵµ£º

C/C++ÎļþµÄ²Ù×÷£¨fread() fwrite()£©

freadº¯ÊýºÍfwriteº¯Êý
1.º¯Êý¹¦ÄÜ
  ÓÃÀ´¶Áдһ¸öÊý¾Ý¿é¡£
2.Ò»°ãµ÷ÓÃÐÎʽ
  fread(buffer,size,count,fp);
  fwrite(buffer,size,count,fp);
3.˵Ã÷
  £¨1£©buffer£ºÊÇÒ»¸öÖ¸Õ룬¶ÔfreadÀ´Ëµ£¬ËüÊǶÁÈëÊý¾ÝµÄ´æ·ÅµØÖ·¡£¶ÔfwriteÀ´Ëµ£¬ÊÇÒªÊä³öÊý¾ÝµÄµØÖ·¡£
  £¨2£©size£ºÒª¶ÁдµÄ×Ö½ÚÊý ......

C/C++ÖеÄÈÕÆÚºÍʱ¼ä time_tÓëstruct tmת»»

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

c/c++Ö§³Ö¿É±ä²ÎÊýµÄº¯Êý

c/c++Ö§³Ö¿É±ä²ÎÊýµÄº¯Êý£¬¼´º¯ÊýµÄ²ÎÊýÊDz»È·¶¨µÄ¡£
Ò»¡¢ÎªÊ²Ã´ÒªÊ¹Óÿɱä²ÎÊýµÄº¯Êý£¿
Ò»°ãÎÒÃDZà³ÌµÄʱºò£¬º¯ÊýÖÐÐÎʽ²ÎÊýµÄÊýĿͨ³£ÊÇÈ·¶¨µÄ£¬ÔÚµ÷ÓÃʱҪÒÀ´Î¸ø³öÓëÐÎʽ²ÎÊý¶ÔÓ¦µÄËùÓÐʵ¼Ê²ÎÊý¡£µ«ÔÚijЩÇé¿öÏÂÏ£Íûº¯ÊýµÄ²ÎÊý¸öÊý¿ÉÒÔ¸ù¾ÝÐèҪȷ¶¨£¬Òò´ËcÓïÑÔÒýÈë¿É±ä²ÎÊýº¯Êý¡£ÕâÒ²ÊÇc¹¦ÄÜÇ¿´óµÄÒ»¸ö·½Ã棬ÆäËüÄ³Ð©Ó ......

ÓÃEclipse CDT ÅäÖà C/C++ ±àÒë»·¾³

1¡¢Java JDKµÄ°²×°
EclipseÊÇÒ»¿î¿çƽ̨µÄ¹¤¾ß£¬Ö»ÐèÒª»ù±¾µÄjavaÐéÄâ»ú¾Í¿ÉÒÔÔËÐС£
°²×°Java
SDKºÜ¼òµ¥¡£µ½http://java.sun.comÉÏÕÒµ½ÊʺÏÄãµÄ²Ù×÷ϵͳµÄJava
JDK°²×°³ÌÐò£¬ÏÂÔØÖ®²¢ÔËÐУ¬Java SDK¾Í»á°²×°µ½ÄãµÄϵͳÖС£
×¢Ò⣬¸ü¸ß°æ±¾µÄEclipseÐèÒª¸ü¸ß°æ±¾µÄJava JDK¡£
2¡¢Eclipse¼°CDTµÄ°²×°
µ½EclipseµÄ¹Ù·½ ......

[C´úÂë]ͨѶ¼

/*****************test.c****************/
#include <stdio.h>
#include <stdlib.h>
#include "addr.h"
int main()
{
 int flag=1;
 while(flag)
 {
  switch(choose_menu())
  {
  case 1:add_person();break;
  case 2:show_person_in ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ