fatal error c1190

hello,
i hope this is the right place to post my problem,,
i'm using microsoft visual C++ 2005
i wrote the following code:

#using <System.XML.dll>
using namespace System::Xml;

int _tmain(int argc, char* argv[])
{
//check for required arguments
if (argc <2)
{
console::WriteLine("Usage :CppXmlTextReader path");
return -1;
}

try
{
//create the reader...
XmlTextReader* rdr = new XmlTextReader(path);
}
catch (exception* pe)
{
Console::Writeline(pe->ToString());
}

}

but i got the following error pointed to the first line
fatal error c1190 manage targeted code requires a ' /clr' optoin.

can any one help me to fix it ,plz?
thank u
[815 byte] By [alaa22] at [2007-11-19 19:32:47]
# 1 Re: fatal error c1190
Go to Project > Properties > Configuration Properties > General > Common Language Runtime support and select /clr ( http://msdn2.microsoft.com/en-us/library/k8d11d4s.aspx).
cilu at 2007-11-9 12:06:43 >
# 2 Re: fatal error c1190
Next time you want to create managed application, select correct application type. You have selected Visual C++ - Win32 - Win32 Console Application, and you need Visual C++ - CLR - CLR Console Application.
Alex F at 2007-11-9 12:07:44 >
# 3 Re: fatal error c1190
In a CLR console application the main should have looked like:

int main(array<System::String ^> ^args)
{
return 0;
}
cilu at 2007-11-9 12:08:43 >
# 4 Re: fatal error c1190
hello,,
thank u guys,,
am fine now,,
actullay,i complete the code & i need to supply the name of the XML document when i run the program,,is it right what i did?
it didn't work? how can i make it plz?

#using<mscorlib.dll>
using namespace System;
#using <System.XML.dll>
using namespace System::Xml;

int main(int argc, char* argv[])
{
//check for required arguments
if (argc <2)
{
Console::WriteLine("Usage :CppXmlTextReader path");
return -1;
}
String^ path = gcnew String(argv[1]);

try
{
//create the reader...
XmlTextReader^ rdr = gcnew XmlTextReader(path);

//Read nodes
while (rdr->Read())
{
//do something with the data
}
//read nodes
while (rdr->Read())
{
switch (rdr->NodeType)
{
case XmlNodeType::XmlDeclaration:
Console::WriteLine("->XML declaration");
break;
case XmlNodeType::Document:
Console::WriteLine("->Document node");
break;
case XmlNodeType::Element:
Console::WriteLine("->Element node, name{0}",rdr->Name);
break;
case XmlNodeType::EndElement:
Console::WriteLine("->End element node,name={0}",rdr->Name);
break;
case XmlNodeType::Text:
Console::WriteLine("->Text node,value={0}",rdr->Value);
break;
case XmlNodeType::Comment:
Console::WriteLine("->Comment node, name={0},value={1}",rdr->Name,rdr->Value);
break;
case XmlNodeType::Whitespace:
break;
default:
Console::WriteLine("**UnKnown node type");
break;
}
}

}
catch (Exception^ pe)
{
Console::WriteLine(pe->ToString());
}
return 0;
}
alaa22 at 2007-11-9 12:09:46 >
# 5 Re: fatal error c1190
What doesn't work?

You have two loops:

while (rdr->Read())

The first one consume everything, so the second one won't execute.
cilu at 2007-11-9 12:10:46 >
# 6 Re: fatal error c1190
thank u
alaa22 at 2007-11-9 12:11:56 >