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

Ç×ÃܽӴ¥C¿É±ä²ÎÊýº¯Êý

Ç×ÃܽӴ¥C¿É±ä²ÎÊýº¯Êý
 ±¾ÎÄ´Ó³ÌÐòԱʵ¼ùµÄ½Ç¶ÈÀ´ÆÊÎöC¿É±ä²ÎÊýº¯ÊýÔÚIntel 32λCPUÉϵÄʵÏÖÓëÔ­Àí
×÷ÕߣºÁÖº£·ã
ÍøÖ·:http://blog.csdn.net/linyt/archive/2008/04/02/2243605.aspx
[*]»¶Ó­×ªÔØ£¬µ«ÇëÍêÕûתÔز¢×¢Ã÷×÷ÕßÒÔ¼°µØÖ·£¬ÇëÎðÓÃÓÚÈκÎÉÌÒµÓÃ;¡£
¿É±ä²ÎÊýº¯ÊýµÄʵÏÖ
    Èç¹û˵CÓïÑÔ¾ßÓкܶàµÍ¼¶ÓïÑÔµÄÌØÐÔ£¬ÄÇô¿É±ä²ÎÊýº¯Êý±ãÊÇÕâЩÌØÐÔÖеÄÒ»¸ö¡£ÎÞÂÛÊÇCר¼Ò»¹ÊÇC³õѧÕߣ¬¶¼¶Ôprintf±ê×¼¿âº¯ÊýÏ൱Á˽⣬ÒòΪËüÊÇÎÒÃDz½ÈëCÓïÑԵĵÚÒ»¸öº¯Êý¡£Ê¹ÓÃprintfº¯Êýʱ£¬¾Í²»Öª²»¾õµØ½Ó´¥µ½CÓïÑԵĿɱä²ÎÊýº¯Êý»úÖÆ¡£
printfº¯ÊýµÄÔ­ÐͶ¨ÒåÈçÏ£º
int printf(const char *format, ...);
Óë´ËÀàËÆ£¬CÓïÑԵĿɱä²ÎÊýº¯ÊýµÄ¶¨ÒåÈçÏ£º
type fun( type arg1, type arg2, ...);
ÆäÖÐtype±íʾÀàÐÍ,arg1, arg2±íʾ²ÎÊýÃû£¬¶ø×îÖØÒªµÄÊǿɱä²ÎÊýº¯ÊýµÄ²ÎÊýÁбíÖгöÏÖÁË“...”·ûºÅ¡£·ûºÅ“...”ÓÃÀ´±íʾ²ÎÊýµÄ¸öÊýÒÔ¼°ÏàÓ¦µÄÀàÐͶ¼ÊǿɱäµÄ£¬Ï൱ÓÚ¶à¸ö²ÎÊýµÄռλ·û£¬¿ÉΪ0¸ö£¬1¸ö»ò¶à¸ö²ÎÊý£¬²¢ÇÒÒªÇó“...”Ç°ÖÁÉÙÓÐÒ»¸ö²ÎÊý£¬²¢ÇÒËüµÄºóÃæ²»ÄÜÔÙ³öÏÖ²ÎÊý¡£ CÓïÑÔÌṩ¿É±ä²ÎÊýº¯Êý¿ÉÒÔ¸ù¾Ýʵ¼ÊµÄÐèÒªÀ´ÊµÏÖ²ÎÊý¸öÊýºÍÀàÐÍΪ¿É±äµÄÇé¿ö£¬ÔÚC±ê×¼¿â¿âÖÐÒÔprintf×îΪ³öÃû¡£¶øÔÚUnix»·¾³ÖУ¬exec¼Ò×庯Êý¾ÍÊÇ×îºÃµÄÀýÖ¤¡£ÔÚ´ËÒÔÒ»¸öÇóºÍº¯Êý£¨sum)À´ÌÖÂÛÈçºÎʵÏֿɱä²ÎÊýº¯ÊýµÄʵÏÖ¡£sumº¯ÊýµÄÄ¿±ê£¬ÓÃÓÚʵÏֿɱä¸öÕûÊýÇóºÍ£¬º¯ÊýÔ­ÐÍ£ºint sum(int num, ...)¡£Óû§ÔÚʹÓøú¯ÊýÊǷdz£·½±ãµÄ£¬Ö»ÐèÖ¸¶¨ÇóºÍµÄ¸öÊýÒÔ¼°Ã¿¸ö²ÎÊý£¬Í¨¹ýµ÷Ó÷µ»ØÇóºÍµÄÖµ¡£µ«ÊÇ´ÓÒÔǰʹÓõķ½·¨À´ÊµÏÖ£¬ÄÇÊǷdz£ÒòÄѵģ¬ÕâÊÇÒòΪ£º
[1]µ±Óû§µ÷ÓÃʱ£¬ÔËÐÐʱÿ¸ö²ÎÊýÖµµÄÄÑÒÔ»ñµÃ£¬ÔÚÆÕͨº¯ÊýÖУ¬Í¨¹ýÐβμ´¿É»ñµÃ£¬µ«ÊÇÔڿɱä²ÎÊýº¯ÊýµÄ²ÎÊýÁбíÖÐÖ»ÓÐ"..."£¬¶ø²»Öª¸÷¸öÐβεÄÃû×Ö¡£
[2]¿É±ä²ÎÊýµÄ¸öÊýÊDz»È·¶¨µÄ£¬ËäÈ»¿ÉÒÔͨ¹ýÇ°ÃæµÄ²ÎÊýÀ´È·¶¨ºóÃæµÄ¿É±ä²ÎÊýµÄ¸öÊýºÍÀàÐÍ£¨Èçsumº¯Êýͨ¹ýnum²ÎÊýÀ´±íÃ÷ºóÃæ¿É±ä²ÎÊýµÄ¸öÊý£¬printfº¯Êýͨ¹ýformatÀ´¾ö¶¨¿É±ä²ÎÊýµÄ¸öÊýÒÔ¼°ËüµÄÀàÐÍ£©£¬µ«ÊÇÕâ¸öº¯Êý¶¨ÒåµÄÓïÒåÎÊÌ⣬CµÄ±àÒëÆ÷²»Äܼì²âµ½ÈκÎÏà¹ØµÄ´íÎ󣬲¢ÇÒÒ²¿ÉÄÜÔËÐÐʱҲ¿ÉÄܲ¶×½²»µ½Ïà¹ØµÄ´íÎó¡£
Èç¹û¶ÁÕ߶ÔCPUÓÐÏ൱µÄÁ˽â»òÕ߶ÔCÓïÑÔº¯Êýµ÷ÓõÄÔ¼¶¨ÊìϤ£¬»òÕ߶Իã±àµÄ¾­Ñ飬ÄÇôÓÃCÓïÑÔ£¨»ò½áºÏ»ã±à£©À´Ð´Ò»¸ö¿É±ä²ÎÊýº¯Êý²¢²»ÊǺÜÄѵġ£ÏÔÈ»£¬½áºÏ»ã±àÀ´ÊµÏֿɱä²ÎÊýº¯Êý»á½µµÍ³ÌÐòµÄ¿ÉÒÆÖ²ÐÔ¡£ÎªÁ˱


Ïà¹ØÎĵµ£º

C/C++ DIR±éÀúº¯Êý

#include <list.h>
#include <dirent.h>
#include <iostream.h>
#include <sys/stat.h>
#include <sys/types.h>
/*****************************************************************
*º¯Êý¹¦ÄÜ: Ä¿_¼_±é_Àú.
*·µ»ØÖµ:   ³É¹¦·µ»Ø0,ʧ°Ü·µ»Ø·Ç0.
*²ÎÊý   path ......

ÔÚ C/C++ÖÐÈçºÎ¹¹ÔìͨÓõĶÔÏóÁ´±í(²»ºÜÀí½â )


http://blog.csdn.net/hwz119/archive/2007/05/25/1625218.aspx
    ÄúÊÇ·ñ×ö¹ýÕâÑùÒ»¸öÏîÄ¿£¬ËüÒªÇóÄúÔÚÄÚ´æÖб£´æÊýÄ¿²»¶¨µÄÈô¸É²»Í¬¶ÔÏ󣿶ÔÓÚijЩÇé¿ö£¬¶þ²æÊ÷ÊÇ×î¼ÑÑ¡Ôñ£¬µ«ÔÚͨ³£Çé¿öÏ£¬¸ü¼òµ¥µÄÁ´±íÊÇÏÔ¶øÒ×¼ûµÄÑ¡Ôñ¡£
Ò»¸ö¼ò»¯µÄÎÊÌâʾÀý
Á´±íµÄÄѵãÔÚÓÚ±ØÐ븴ÖÆÁ´±í´¦Àíº¯ÊýÀ´´¦Àí²»Í¬µÄ¶ÔÏó ......

linuxϼÆËãÖ¸¶¨Ä¿Â¼ÏÂÓ°¼þµÄ´óС£¬»ùÓÚcÓïÑÔ

 1//ÓÉÓÚʹÓÃgcc±àÒ룬ËùÒÔ±àÒëʱҪÁ´½ÓÉÏc++µÄ¿â£¬ÃüÁîÊÇgcc -lstdc++ main.cpp -o main
//±¾ÎÄС³ÌÐòʵÏÖµÄÊǶÔ/home/1.avi´óСµÄ¼ÆËã¡£ºÜ¼òµ¥£¬Ìù³öÀ´Ö»ÊÇΪÁË·½±ã²»ÖªµÀµÄÅóÓÑ
  2 #include <stdio.h>
  3 #include <stdlib.h>
  4 #include <sys/stat.h>
  5 #includ ......

LinuxÏÂCÓïÑÔ±à³Ì ÐźŴ¦Àíº¯Êý

Ç°ÑÔ:ÕâÒ»ÕÂÎÒÃÇÌÖÂÛÒ»ÏÂLinuxϵÄÐźŴ¦Àíº¯Êý. 
     LinuxϵÄÐźŴ¦Àíº¯Êý: 
1.ÐźŵIJúÉú 
2.ÐźŵĴ¦Àí 
3.ÆäËüÐźź¯Êý 
--------------------------------------------------------------------------------
Ò»¸öʵÀý 
1¡£ÐźŵIJúÉú  ......

C ÓïÑÔ±à³Ì————¾­Ñé̸֮

1¡¢CÓïÑÔµÄÏîÄ¿ÄÚ´æ¹ÜÀíºÜÈÃÈËÍ·ÌÛ£¬×ÔʼÖÁÖÕÄãÒªÃ÷°×ÄÄЩÄÚ´æÓ¦¸ÃÒªÊÍ·Å£¬ÄÄЩµ½×îºó²ÅÄÜÊÍ·Å£¬²»È»µÄ»°£¬¾Í»á³öÏÖһЩ¶Ñ±»ÆÆ»µµÄ´íÎó
2¡¢Ã¿Ð´Ò»¸öº¯ÊýÒ»¶¨Òª¼ÇµÃдËüµÄ²âÊÔ³ÌÐò£¬²»¹ÜÄǸöº¯Êý¼òµ¥µÄ»¹ÊǸ´ÔÓ£¬²»È»µÄ»°£¬µ½×îºó»áæËÀÄ㣬ÓÐʱ»¹»á·¸Ò»Ð©µÍ¼¶µÄ´íÎó¡£Õâ¸ö½ÌѵÎҾͷ¸¹ý£¬Ð´ÁËÒ»´ó¶ÑUtility¹¤¾ßº¯Êý¿â£¬Ò»¸ö ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ