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

DAY3|±à¸ö"hello world"µÄC³ÌÐòÏÈ~

½ñÌìÒª±à¸ö×î¼òµ¥µÄ"hello world"µÄC³ÌÐò£¬ËãÊdzõ²½¸ÐÊÜÏÂLinuxÖеıà³Ì»·¾³£¬Éæ¼°ÒÔÏÂ3¸ö²½Ö裺
1. ÏÈÔÚ"vim"Àï±àдԴÎļþ£»
2. È»ºóÔÙÓÃ"gcc"±àÒëÉú³É"hello"µÄ¿ÉÖ´ÐÐÎļþ£»
3. ÔËÐÐ"hello"£¬¿´¿´Ð§¹û¡£
ÄÇô¿ªÊ¼°É£¡
1. vim
vim hello.c
i
#include <stdio.h>
int
main (void)
{
printf ("hello.\n");
return 0;

ESC
ZZ
2. gcc
gcc -Wall hello.c -o hello
3. ÔËÐгÌÐò
./hello


Ïà¹ØÎĵµ£º

̸̸C/SºÍB/SµÄÌصã

C/SÊÇ¿Í»§¶Ë/·þÎñÆ÷¶Ë£¬C/SµÄ³ÌÐòͨ³£Ò²½ÐÅÖ¿Í»§¶Ë£¬Ò²¾ÍÊÇÒ»¸ö³ÌÐòµÄ´ó²¿·Ö¹¦ÄÜ£¬¶¼ÔÚ¿Í»§¶ËʵÏÖ£¬¶ø·þÎñÆ÷¶ËֻʵÏÖһС²¿·Ö¹¦ÄÜ¡£Í¨¹ýÕâµã²»ÄÑ¿´³ö£¬C/SµÄ³ÌÐò´ó²¿·ÖÔÚ¿Í»§¶ËʵÏÖ£¬¶ÔÓÚ·þÎñÆ÷¶ËµÄѹÁ¦Ïà¶ÔСһЩ£¬·þÎñÆ÷¶Ë¿ÉÒÔ½ÚʡһЩ¡£¶øÇÒC/SµÄ³ÌÐòÓô°¿ÚÀ´×ö£¬¸öÈËÈÏΪ¿ª·¢Ð§ÂÊÉÏ¿ìÒ»µã¡£µ«C/SµÄ³ÌÐòÒ»´ó±×¶Ë¾ÍÊÇ£¬±Ø ......

C/C++——С±à̸CÓïÑÔº¯ÊýÄÇЩÊÂ(22)

C³ÌÐòÊÇÓÉÒ»×é»òÊDZäÁ¿»òÊǺ¯ÊýµÄÍⲿ¶ÔÏó×é³ÉµÄ¡£ º¯ÊýÊÇÒ»¸ö×ÔÎÒ°üº¬µÄÍê³ÉÒ»¶¨Ïà¹Ø¹¦ÄܵÄÖ´ÐдúÂë¶Î¡£ÏÂÃæС±àºÍ´ó¼Ò·ÖÏíÏÂCÓïÑÔÖеĺ¯Êý¡£
 
1.    setmemº¯Êý
setmemº¯ÊýµÄ¹¦ÄÜÊÇ´æÖµµ½´æ´¢Çø£¬ÆäÓ÷¨Îª£ºvoid setmem(void *addr, int len, char value);³ÌÐòʵÀýÈçÏ£º
#include <stdio.h& ......

C/C++——С±à̸CÓïÑÔº¯ÊýÄÇЩÊÂ(23)

C³ÌÐòÊÇÓÉÒ»×é»òÊDZäÁ¿»òÊǺ¯ÊýµÄÍⲿ¶ÔÏó×é³ÉµÄ¡£ º¯ÊýÊÇÒ»¸ö×ÔÎÒ°üº¬µÄÍê³ÉÒ»¶¨Ïà¹Ø¹¦ÄܵÄÖ´ÐдúÂë¶Î¡£ÏÂÃæС±àºÍ´ó¼Ò·ÖÏíÏÂCÓïÑÔÖеĺ¯Êý¡£
 
1.   settextstyleº¯Êý
settextstyleº¯ÊýµÄ¹¦ÄÜÊÇΪͼÐÎÊä³öÉèÖõ±Ç°µÄÎı¾ÊôÐÔ£¬ÆäÓ÷¨Îª£ºvoid far settextstyle (int font, int direction, char size);³ ......

C/C++——С±à̸CÓïÑÔº¯ÊýÄÇЩÊÂ(26)

C³ÌÐòÊÇÓÉÒ»×é»òÊDZäÁ¿»òÊǺ¯ÊýµÄÍⲿ¶ÔÏó×é³ÉµÄ¡£ º¯ÊýÊÇÒ»¸ö×ÔÎÒ°üº¬µÄÍê³ÉÒ»¶¨Ïà¹Ø¹¦ÄܵÄÖ´ÐдúÂë¶Î¡£ÏÂÃæС±àºÍ´ó¼Ò·ÖÏíÏÂCÓïÑÔÖеĺ¯Êý¡£
 
1.   sopenº¯Êý
sopenº¯ÊýµÄ¹¦ÄÜÊÇ´ò¿ªÒ»¹²ÏíÎļþ£¬ÆäÓ÷¨Îª£ºint sopen(char *pathname, int access, int shflag, int permiss);³ÌÐòʵÀýÈçÏ£º
#include ......

C/C++Ì⼯

ת×Ô£º http://hi.baidu.com/elliott_hdu/blog/item/411421dd5bf8dfe977c63876.html
1.ÏÂÁгÌÐòµÄÊä³ö½á¹ûΪ£º(B)
#include<iostream.h>
void main()
{
       char* a[ ] = { "hello", "the", "world"};
       char** pa = a;
 &nbs ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ