A
AA2e72E
I have two lines of basic C# code
System.IO.Directory.CreateDirectory(path);
return System.IO.Directory.Exists(path);
I want to bury this in a C++ Win32 Project. My effort so far (that does not
work and I do not understand the error messages) is:
#using <mscorlib.dll>
using namespace System;
using namespace System::IO;
bool* _clrcall;bool CDirectory(String path)
{
DirectoryInfo d = Directory::CreateDirectory(path);
return (d.Exists(path));
}
I get
Error 3 error C3149: 'System::String' : cannot use this type here without a
top-level '^'
Error 4 error C2664:
'System::IO:irectoryInfo:irectoryInfo(System::String ^)' : cannot convert
parameter 1 from 'System::IO:irectoryInfo ^' to 'System::String ^'
Error 5 error C2064: term does not evaluate to a function taking 1 arguments
I would be grateful for some guidance/clues; thanks.
System.IO.Directory.CreateDirectory(path);
return System.IO.Directory.Exists(path);
I want to bury this in a C++ Win32 Project. My effort so far (that does not
work and I do not understand the error messages) is:
#using <mscorlib.dll>
using namespace System;
using namespace System::IO;
bool* _clrcall;bool CDirectory(String path)
{
DirectoryInfo d = Directory::CreateDirectory(path);
return (d.Exists(path));
}
I get
Error 3 error C3149: 'System::String' : cannot use this type here without a
top-level '^'
Error 4 error C2664:
'System::IO:irectoryInfo:irectoryInfo(System::String ^)' : cannot convert
parameter 1 from 'System::IO:irectoryInfo ^' to 'System::String ^'
Error 5 error C2064: term does not evaluate to a function taking 1 arguments
I would be grateful for some guidance/clues; thanks.