开发者

converting file path to native path in vc++

开发者 https://www.devze.com 2023-04-11 16:11 出处:网络
I am new to vc++. I have a problem in converting file path to native path. As a example I am getting file path using OpenFileDialog in vs2010. It will gain the path as

I am new to vc++. I have a problem in converting file path to native path.

As a example I am getting file path using OpenFileDialog in vs2010. It will gain the path as

string ^path = "C:\path\file.mel";

But I want to convert that path as

String ^Result= "C:/path/fil开发者_如何学Pythone.mel";

Please help me.


Please try:

String ^Result= "C:\path\file.mel".Replace('\\', '/');
0

精彩评论

暂无评论...
验证码 换一张
取 消