/clr option in c++
- by muhammad-aslam
hello friendzz
plz give me a solution for this error
"fatal error C1190: managed targeted code requires a '/clr' option"
HOw can i resolve this problem??
My configuration is ..
Visual studio 2008
windows 7
Here is the code (i got by using net resources)
using
using namespace System;
using namespace System::IO;
int main() {
// Create a reference to the current directory.
DirectoryInfo* di = new DirectoryInfo(Environment::CurrentDirectory);
// Create an array representing the files in the current directory.
FileInfo* fi[] = di-GetFiles();
Console::WriteLine(S"The following files exist in the current directory:");
// Print out the names of the files in the current directory.
Collections::IEnumerator* myEnum = fi-GetEnumerator();
while (myEnum-MoveNext()) {
FileInfo* fiTemp = __try_cast(myEnum-Current);
Console::WriteLine(fiTemp-Name);
}
}
PLZZZZZZZZ