易截截图软件、单文件、免安装、纯绿色、仅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


相关问答:

eclipse3.5+cdt编译c有问题

编译普通的c没问题啊,但编译javah生成的就报错:
gcc -O0 -g3 -Wall -c -fmessage-length=0 -oHelloWorld.o ..\HelloWorld.c
gcc -otest.exe HelloWorld.o
d:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../. ......

能用C/C++简单实现五子棋程序吗?

最近突然想自己来实现一个五子棋程序,但不知道怎么开始,自己也没学画图形函数,能在控制台下直接写吗>>>?????
控制台?比图形界面更麻烦。
http://search.download.csdn.net/search/%E4%BA%94%E5%AD%90% ......

你们现在还在用C吗?C有前途吗?

你们现在还在用C吗?C有前途吗?
一定,并永远坚持

引用
一定,并永远坚持



有用。

楼主何出此言

楼主来c版问这个问题是踢馆用意吗哈哈

越来越冷是肯定的,完全淘汰倒也没那么容易

c ......

c中的转义字符问题

    '\108'作为字符常量对不对?
转义字符'\ddd'表示3位8进制所代表的字符。 但是108不是正确的8进制表示方法,因此应该是错误的。
但是char a='\108'; 为什么编译不出错呢?
\108 没超过 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号