Hello all
I have a problem.I am trying to convert 'System:tring ^' to 'const char *' but i don`t know how.
can some one please help me?
I use VC++ 2005
I need to open files with extension .wav
my code is:
public:System::Void button1_Click(System::Object^ sender, System::EventArgs^ e)
{
OpenFileDialog open;
open.Title = "Select Wave File";
open.Multiselect = true;
open.CheckFileExists = true;
open.Filter = "Audio Files (*.wav)|*.wav";
open.FilterIndex = 2;
open.InitialDirectory="C:";
if (open.ShowDialog()==System::Windows::Forms::DialogResult::OK )
{
ifstream waveFile (open.FileName);// my error is here
.
if I use for example
ifstream waveFile("test.wav") i get no errors
what can I do if I want to open *.wav