devan
devan

Reputation: 1653

converting file path to native path in vc++

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/file.mel";

Please help me.

Upvotes: 0

Views: 251

Answers (1)

ControlPower
ControlPower

Reputation: 610

Please try:

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

Upvotes: 1

Related Questions