获取相对路径 [英] Get the relative path

查看:123
本文介绍了获取相对路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我有一个代码,其中有一个文件.我应该获得该文件的完整路径.如何获取文件的相对路径?请帮助我.

Hi all,
I have a code where in I have one file. I should get the full path of that file. How can I get the relative path of a file? Please help me.

推荐答案

PathRelativePathTo Function
Creates a relative path from one file or folder to another.

http://msdn.microsoft.com/en-us/library/bb773740%28VS.85%29.aspx



您可以使用GetModuleFileName().
谢谢,
Satheesh
Hi,
You can use GetModuleFileName() .
Thanks,
Satheesh


这篇关于获取相对路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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