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
*/
是不是没头文件啊
printf("%s",*buffer); 这里是不是错了
#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>
头文件。
{{--
相关问答:
在查询后将查询出来的值赋给各输入框
<c:if test="${not empty dataValue}">
fm.SAMPLING_DATE.value=" <c:out value='${dataValue.SAMPLING_DATE}'/ ......
C\C++如何计算函数的导数,本人新手,想写个程序,但是不知道如何下手,还望高手指点一二,谢过。
这个……
跟函数的具体形式有关吧,难道你想编出个“万能”的求导函数?
俺上学时想过自动推导公式,后来 ......
大家好!我是一位C爱好者,向大家请教下,C程序员可好找工作?公司用C干些什么?
无所谓好不好找工作,一般通信、系统、嵌入式、硬件方面用的多,而且由于C的底层特性,学会后在学其他的会比较容易
不管用什么语 ......
内容涉及:C、C++、STL、VC++、MFC、COM、ATL、Windows网络编程、数据库编程、Windows驱动编程、软件工程、Windows操作系统编程,等等方面。
下载地址:http://www.cctry.com/forumdisplay.php?fid=46
......
现在有关c++、c的书籍,那些书是较深层次的?请介绍几本?
#include <iostream>
using namespace std;
int funhion(int x, int y )
{
int m,n;
  ......