易截截图软件、单文件、免安装、纯绿色、仅160KB

linux c 下的文件操作

在linux c 下是否能够使用fopen 和fclose 两个函数打开文件?为什么我使用fopen是程序出现“core dump”的错误,而使用open却可以成功。因为我接下来的工作用fopen比较方便,所以请高手指教。
还有是不是所有vc下的c函数都能够在linux c下使用?
linux下当然可以使用fopen和fclose,你出错的程序贴上来看看?

1. 确认是 fopen就错了,还是之后,比如open一个不存在的文件,然后fread就会错
2. 确认是否是应用程序,在驱动里不能用fopen

linux c 下是能够使用fopen 和fclose 两个函数打开文件, 出现错误, 查一下参数有没有对.

还有是不是所有vc下的c函数都能够在linux c下使用?

ANSI C 的库函数都能够在 Linux下使用.



#include <stdio.h>

FILE *fopen(const char *path, const char *mode);

The argument mode points to a string beginning with one of the following sequences (Additional  characters  may follow these sequences.):

      r      Open text file for reading.  The stream is positioned at the beginning of the file.

      r+    Open for reading and writing.  The stream is positioned at the beginning of the file.

      w      Truncate file to zero length or create text file for writing.  The stream is positioned at the beginning of the file.

      w+    Open for reading and writing.  The file is cr


相关问答:

c/c++每条指令和函数的执行时间是多少?

想知道每条指令或函数的系统消耗。比如系统执行int a=0;的开销是多少。有没有类似的文档之类的。不要和我说用什么clock()函数来测试。我想要相关总结好的文档
先反汇编,然后拿着cpu的指令手册查每条指令的时间周期 ......

使用C的高手请进

大家好!我是一位C爱好者,向大家请教下,C程序员可好找工作?公司用C干些什么?
无所谓好不好找工作,一般通信、系统、嵌入式、硬件方面用的多,而且由于C的底层特性,学会后在学其他的会比较容易

不管用什么语 ......

C如何调用PHP函数

如题,请知道的高手指点一下,THANKS
PHP函数都是用C实现的~
反其道而行之~

HOHO,关键是,自已再去实现这个功能累啊,PHP有现成的就直接调用好了,

顶起,有高手点解一下,或者是我直接将PHP 源码中的 .c ......

请C/C++高手进,请教!

功能是实现字符串的翻转,不知道哪里有错误,请指教
#include <iostream>
#include <stdio.h>

using namespace std;
void reverse()
{
char ch;
scanf("%c",ch) ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号