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

linux c ±àÒëͨ²»¹ý£¬Çë¸ßÊÖ°ïÎÒ¿´ÏÂÄÄÀïµÄ´í£¿

int _send()
{
int fd,size;
char fname[1024],buffer[4096];

/*ÊäÈëÒª´«ÊäµÄÎļþ*/
printf("ÇëÊäÈëÄúÒª´«ÊäµÄÎļþ·¾¶:\n");
gets(fname);
/*´ò¿ªÎļþ*/
fd = open(fname,O_RDONLY,0);
/*¶ÁÈ¡Îļþ*/
while((size = read(fd,buffer,4096))>0)
{
/*µ÷ÓÃclientº¯Êý£¬´«ÊäÎļþ*/
// client(buffer);
printf("%s",*buffer);
}
if(size == -1)
{
fprintf(stderr,"Read Error: %s\a\n",strerror(errno));
exit(-1);
}
/*´«Êä½áÊø,¹Ø±ÕÎļþ*/
close(fd);
printf("´«ÊäÍê±Ï£¡\n");
£ý
/*ÎÒÓÃgcc -c clien client.c±àÒ룬
*Ìáʾ´íÎóÐÅÏ¢:
*
*client.c: ÔÚº¯Êý¡®_send¡¯ÖУº
*client.c:58: ´íÎó£º ÔÚµ÷ÊÔÆ÷ÀïÖØÐÂÔËÐд˳ÌÐò
*client.c:58: ´íÎó£º ÔÚµ÷ÊÔÆ÷ÀïÖØÐÂÔËÐд˳ÌÐò
*client.c:58: ´íÎó£º ÔÚµ÷ÊÔÆ÷ÀïÖØÐÂÔËÐд˳ÌÐò
*client.c:58: ´íÎó£º expected declaration or statement at end of input
*/
ÊDz»ÊÇûͷÎļþ°¡

printf("%s",*buffer); ÕâÀïÊDz»ÊÇ´íÁË

#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <netdb.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <netinet/in.h>
#include <sys/socket.h>

Í·Îļþ¡£
{{--


Ïà¹ØÎÊ´ð£º

PHPÀ©Õ¹CʱµÄÎÊÌâ

ÎÒÓÃPHPÀ©Õ¹Cʱ£¬ÓõÄÊÇÔ´ÂëextĿ¼ÏµÄ./ext_skel
×îºó±àÒë×ÜÊDz»ÄÜÉú³ÉÀ©Õ¹Ä£¿éµÄ.so¶¯Ì¬¿â£¬ÎÒÓõİ汾ÊÇ5.3.0£¬
ÕâÊÇÔõô»ØÊ£¬¸ßÊÖ½â´ðÏÂ

²»ÄÜÉú³ÉʱÓÐɶÌáʾÐÅÏ¢£¿

ÔËÐÐÁË/ext_skel --extname=Ä ......

C ³ÌÐòÎÊÌâ (¶þ) - C/C++ / CÓïÑÔ

ÎÊһϣº
#include <stdio.h>
int main()
{
  char x, y, z;
  int i;
  int a[16];
  for(i=0; i<=16; i++)
  {
  a[i] = 0;
  ......

CÖеÄһЩСÎÊÌâ¡£¡£¡£

/* Note:Your choice is C IDE

×÷Ó㺠Ëæ»úÊý¼ÓÃÜ·¨£¬£¬£¬£¬
ÒÔÏÂÓÐÐí¶à²»¶®£¬Çë½Ìһϣ¬ÇëÖ÷Òâ´úÂë;
*/
#include <stdio.h>
#include <stdlib.h>
union
{
int value;
struct
{
c ......

C/S³ÌÐòÔÚÏß×Ô¶¯¸üÐÂÎÊÌ⣬ллÇó½Ì£¡

Ä¿Ç°Óöµ½µÄÎÊÌâÊÇ£º
´æ·ÅÔÚÔ¶³Ì·þÎñÆ÷¶Ëc/s³ÌÐòÒ»ÓиüУ¬ÈçºÎ×öµ½¿Í»§¶ËÁ¢¼´ÏìÓ¦µ¯³öÓÐ×îÐÂÉý¼¶µÄÌáʾ´°¿Ú¡£
±¾À´Óеã˼·£º²ÉÓÃWCF+windowns·þÎñ+¶¨Ê±Æ÷µÄ·½Ê½Ò²ÄÜʵÏÖ£¬µ«ÊÇÿ̨¿Í»§¶Ë»ú×Óÿ¸ô¶¼È¥·ÃÎÊÒ»ÏÂÔ¶³Ì ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ