Click to See Complete Forum and Search --> : [RESOLVED] std::string to System::String


Airashby
January 5th, 2009, 09:31 AM
How do I do this I think I'm going mad.

fstream input("Input.dat", ios::in);
vector<string> list;
char listc[512];

while( input.getline(listc, 512) )
list.push_back( listc );

input.close();

for(int i = 0; i < (int) list.size(); i++)
{
Process^ myProcess;
myProcess->StartInfo->FileName = list[i];
}

Andreas Masur
January 5th, 2009, 05:43 PM
std::string s("Hello");
System::String^ String = gcnew System::String(s.c_str());

should work....

Airashby
January 7th, 2009, 03:16 AM
Thank you that did the trick.