Use of a naming system; in visual studio 2013

I am trying to use the Console :: SetCursorPosition (int, int) method . When I add a line using namespace System;, as shown in the C ++ example from the previous MSDN documentation, I get an error "Error: name must be a namespace name". I tried things for a couple of hours, but, unfortunately, to no avail. I came across the subtleties of documentation for Visual Studio 2010 and 2012, but very little for 2013. The closest I came lib files as a linker attachment . Steps 1-3 are easy enough, but step 4 is not clear to me: "Change the property of additional dependencies." Looking at what already exists, it seems that I can just add the .lib file. But I do not have System.lib.

So upset, so confused.

How to use the System namespace in Visual Studio 2013 Update 4 for C ++?

+4
source share
3 answers

To formalize and expand my comment, Consoleclass and Systemnamespace in general are part of the .NET platform.

"++", MSDN Console:: SetCursorPosition (int, int) ++/CLI. ++/CLI ( ) ++. , ++/CLI , ++, Win32.

, "Error: name must be a namespace name", Win32 ++ CLR. - , "Visual ++" / "CLR":

Creating new C ++ CLR project

deplendencies .lib( Lib Files as Linker Input) Win32 CLR . " " " , ":

CLR assembly references

, System CLR. MSDN .

, Win32, "Common Language Runtime Support" "" "C/++, General" /clr, /clr:pure, /clr:safe /clr:oldSyntax ( , /clr) , . Net framework, .vcxproj( ). , .

+4

Win32 Console Application, .NET. Win32 4-5 , std. using namespace std; .

+1

You must set Common Language Runtime Support (/clr)in the configuration properties - General:

enter image description here

And in the configuration properties - C / C ++ - General:

enter image description here

+1
source

All Articles