有什么办法用C语言来更改目录? [英] Is there any way to change directory using C language?

查看:148
本文介绍了有什么办法用C语言来更改目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法通过,我可以 变化到任意目录通过执行 C程序 <? / p>

解决方案

根据您的操作系统上也有改变当前目录不同的呼叫。这些通常只改变运行可执行进程的当前目录。进程退出后,你会在你的启动目录。

Is there any way by which I can change to any directory by executing a C program?

解决方案

Depending on your OS there are different calls for changing the current directory. These will normally only change the current dir of the process running the executable. After the process exits you will be in the directory you started in.

这篇关于有什么办法用C语言来更改目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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