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

c primer plus Ò»µÀÁ·Ï°Ì⣬ÇóÖú - C/C++ / CÓïÑÔ

ÌâÄ¿ÊÇ£º±àдһ¶Î³ÌÐò£¬ÒÀ´ÎÔÚÆÁÄ»ÉÏÏÔʾÃüÁîÐÐÖÐÁгöµÄËùÓÐÎļþ¡£Ê¹ÓÃargc¿ØÖÆÑ­»·
£¨Write a program that sequentially displays onscreen all the files listed in the command line. Use argc to control a loop.£©
¼¸ºõÊÇÕÕ³­ÍøÉϵÄÁ·Ï°Ô´´úÂ룬µ«½á¹ûÊÇ´íµÄ
C/C++ code:
1 #include <stdio.h>
2 #include <stdlib.h>
3
4
5 int main(int argc,char *argv[])
6 {
7 int byte;
8 FILE *source;
9 int filect;
10
11 if(argc==1)
12 {
13 printf("Usage: %s filename[s]\n",argv[0]);
14 exit(EXIT_FAILURE);
15 }
16
17 for(filect=1;filect<argv;filect++)
18 {
19 if((source=fopen(argv[filect],"r"))==NULL)
20 {
21 printf("Counld not open file %s for input\n",argv[filect]);
22 continue;
23 }
24
25 while((byte==getc(source))!=EOF)
26 {
27 putchar(byte);
28 // putc(byte,stdout);
29 }
30
31 if(fclose(source)!=0)
32 {
33 printf("Counld not close file %s\n",argv[1]);
34 }
35 }
36 return 0;



ubuntuÏÂÔËÐнá¹ûΪ
C/C++ code
��������������ʏ


Ïà¹ØÎÊ´ð£º

linux»·¾³ÏÂgethostbynameº¯ÊýÎÊÌâ - C/C++ / CÓïÑÔ

дÁ˸ö²âÊÔ³ÌÐòÈçÏÂ
   
  struct hostent *hp; 
char AlarmDevIP[20];  
  int x2;

hp = gethostbyname("www.google.com");
if (hp)
{ ......

Ϊʲôxml²»ÄÜÏÔʾ°¢À­²®ÎÄ - C/C++ / C++ ÓïÑÔ

ΪʲôÎҵijÌÐòµ÷ÓÃXMLÅäÖÃÎļþÖеİ¢À­²®ÎÄÏÔʾ²»³öÀ´£¿ÆäËûµÄÓïÖÖ¶¼¿ÉÒÔ£¬ÈçÖÐÎÄ£¬Ó¢ÎÄ£¬µÂÎĶ¼¿É¡£
ÎÒ½«XMLµÄ±àÂë¸ÄΪutf-8ºÍunicodeµÄµ½µÃ½á¹û¶¼Ò»Ñù.
°¢À­²®ÎĵÄ×Ö¿âÄãÓÐô£¿

ÓÐ,ÎÒµÄEXEÊÇ·ÅÔÚpc»úÉÏÖ´Ðе ......

ÇóÖú£ºC´úÂëchange toVB´úÂë - VB / »ù´¡Àà

ͦ·±Ëö£¬Ö®Ç°·¢µÄÌû×Ó£¬·Öֵ̫µÍÏÖÔÚÖØ·¢Ò»¸ö¡£»¶Ó­¸÷λ´óÏÀ~~
#include "stdlib.h"
#include "math.h"
#include "stdio.h"
float objfx(float x[]);
void constraint(float x[] ......

¸ÕѧÍêCµÄ»ù´¡£¬ÇóÏÂÒ»²½ - C/C++ / CÓïÑÔ

ÎÒ¸Õ°ÑÌ·ºÆÇ¿µÄµÚÈý°æµÄÊéѧÍ꣬ÎÒÖªµÀµÄÓÐC++£¬CºÍÖ¸Õë CȱÏݺÍÏÝÚå Cר¼Ò±ä³É£¬»¹ÓÐÊý¾Ý½á¹¹£¬ÎÒÏëÎÊÎÊÎÒÓ¦¸ÃÒÔʲô˳ÐòÀ´Ñ§ÄØ
CȱÏݺÍÏÝÚå Cר¼Ò±à³Ì
Êǽø½×µÄ£¬²»Óü±×Å¿´
ÖÁÓÚ
CºÍÖ¸Õë 
Äã²»Àí½âÖ ......

ÓйØAccessÊý¾Ý¿â´æÈ¡µÄÎÊÌâ - C++ Builder / »ù´¡Àà

ÈçºÎ½«Ò»¸öListBoxÖеÄÊý¾Ý´æÔÚÊý¾Ý¿âÖеÄÒ»¸ö×Ö¶ÎÏÂÃ棬²¢ÇÒÿÌõ¼Ç¼µÄ×Ö·û´®¸öÊý²»Ò»¶¨ ÒÔ¼°ÈçºÎ´ÓÊý¾Ý¿âÖжÁÈ¡¸ÃListBoxÖеÄËùÓмǼ
C/C++ code:

//´æÈëÊý¾Ý¿â
void __fastcall TForm1::Button5Click(TO ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ