Has anyone tried to write this tutorial using VC++ 2008 Express? The article claims to be written with VC++ 2005. But I thought 2005 and 2008 used compatible versions of CLR language. I'm getting all kinds of compiler errors -- for example
String* str; instead of using
String^ str; and creating objects with new instead of gcnew. The last straw for me was while attempting to implement the section concerning FileInfo class. None of the FileInfo methods Microsoft has in that article work.
Jump to Post
The tutorial tells you what to do to compile as Managed C++ instead of C++/CLI:
Note In Visual C++ 2005, you must add the common language runtime support compiler option (/clr:oldSyntax) to successfully compile the previous code sample as Managed C++. To add the common language runtime support compiler option, …
All 4 Replies
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.