相关疑难解决方法(0)

在C中另一个目录中打开文件

如何实现的?我想用

pFile = fopen( file, "rb" );
Run Code Online (Sandbox Code Playgroud)

其中file是一个char,字符串或long,其中包含包含二进制文件本地路径的文字文本

C:\Documents and Settings\Supernovah\Desktop\Supernovah.bin
Run Code Online (Sandbox Code Playgroud)

但是当然会崩溃。

我也对如何以可移植的方式重现当前目录感兴趣。windows.h有点丑陋,但是如果我不能以便携式的方式做到这一点。随它吧。

谢谢 :)

c binary fopen

0
推荐指数
1
解决办法
1万
查看次数

标签 统计

binary ×1

c ×1

fopen ×1