File.exists在C? [英] File.exists in C?

查看:138
本文介绍了File.exists在C?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我是VB程序员,并且想知道,有没有办法检查并查看文件是否存在于直接C中?


在VB中代码为:

Hi,

I''m a VB programmer, and was wondering, is there a way to check and see if a file exists in straight C?

In VB the code is:

展开 | 选择 | Wrap | 行号

推荐答案



我在网上找到了这个:
Hi,

I found this online:
展开 | 选择 | Wrap | 行号


好吧,如果你想一想它,他们做同样的事情。 0表示失败,任何其他数字代表循环中的pass / true条件,因此您实际上只是更改要返回的数据类型。我无法想象一个特定的原因,一个人在Linux中会比另一个更好。
Well, if you think about it, they do the same thing. 0 stands for a fail and any other number stands for a pass/true condition in a loop, so you''re really just changing the datatype you''re returning. I can''t think of a specific reason one would work better than the other in Linux.



好​​吧,如果你考虑一下,他们做同样的事情。 0表示失败,任何其他数字代表循环中的pass / true条件,因此您实际上只是更改要返回的数据类型。我不能想到一个特定的原因,一个人在Linux中比另一个更好。
Well, if you think about it, they do the same thing. 0 stands for a fail and any other number stands for a pass/true condition in a loop, so you''re really just changing the datatype you''re returning. I can''t think of a specific reason one would work better than the other in Linux.



我将=更改为==,这也是正确的吗?


谢谢,

Sitko。

I changed the "="s to "=="s, is that correct as well?

Thanks,
Sitko.


这篇关于File.exists在C?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆