托管c++和c++ /CLI的区别是什么?

时间:2022-06-15 05:31:20

What is exactly the difference between the "old" Managed C++ and the "new" C++/CLI?

“旧”管理c++和“新”c++ /CLI之间的区别是什么?

3 个解决方案

#1


33  

Managed C++ is the version in VS2002 and VS2003. It had race conditions and other serious bugs, as well as being confusing. It's no longer supported.

托管c++是VS2002和VS2003中的版本。它有比赛条件和其他严重的缺陷,以及令人困惑。它不再支持。

In VS2005, Microsoft introduced C++/CLI, which has also been accepted as an ISO standard. It's also supported in VS2008 and the upcoming VS2010.

在VS2005年,微软引入了c++ /CLI,这也被作为ISO标准接受。它在VS2008和即将发布的VS2010中也得到了支持。

Both of them had the same goal, which is to create .NET assemblies using the C++ language. The syntax is different (C++/CLI managed code is a lot easier to differentiate from standard C++ at a glance) and C++/CLI also has syntax for .NET 2.0 features such as generics.

它们都有相同的目标,即使用c++语言创建。net程序集。语法是不同的(c++ /CLI管理的代码与标准c++相比更容易区分),c++ /CLI也有. net 2.0特性的语法,比如泛型。

#2


12  

http://msdn.microsoft.com/en-us/library/ms235298.aspx gives a rough overview of the syntax changes.

http://msdn.microsoft.com/en-us/library/ms235298.aspx给出语法变化的粗略概述。

#3


1  

Managed C++ (Managed Extensions for C++) is a set of microsoft specific keywords used with standard C++ syntax to allow compile managed code. IT was designed such that programmers could start using .NET as fast as possible and made porting native code to .NET platform very easy. It used IJW (it just works) priciple, which made programming porting to .NET easier, but it also had lot of flaws.

托管c++ (c++的托管扩展)是一组microsoft特定的关键字,与标准c++语法一起使用,以允许编译托管代码。它的设计使得程序员可以尽可能快地使用。net,并将本地代码移植到。net平台上非常容易。它使用了IJW(它只工作)原理,这使得移植到。net的程序更容易,但是它也有很多缺陷。

C++/CLI is a new language. It solved lot of problems of Managed C++, made .NET programming more powerful and is accepted as standard, but also introduces new syntax, new keywords, and is more more different from unmanaged C++ than older Managed C++.

c++ /CLI是一种新的语言。它解决了托管c++的许多问题,使. net编程变得更强大并被接受为标准,但也引入了新的语法、新的关键字,与非托管c++相比,它与非托管c++的区别更大。

#1


33  

Managed C++ is the version in VS2002 and VS2003. It had race conditions and other serious bugs, as well as being confusing. It's no longer supported.

托管c++是VS2002和VS2003中的版本。它有比赛条件和其他严重的缺陷,以及令人困惑。它不再支持。

In VS2005, Microsoft introduced C++/CLI, which has also been accepted as an ISO standard. It's also supported in VS2008 and the upcoming VS2010.

在VS2005年,微软引入了c++ /CLI,这也被作为ISO标准接受。它在VS2008和即将发布的VS2010中也得到了支持。

Both of them had the same goal, which is to create .NET assemblies using the C++ language. The syntax is different (C++/CLI managed code is a lot easier to differentiate from standard C++ at a glance) and C++/CLI also has syntax for .NET 2.0 features such as generics.

它们都有相同的目标,即使用c++语言创建。net程序集。语法是不同的(c++ /CLI管理的代码与标准c++相比更容易区分),c++ /CLI也有. net 2.0特性的语法,比如泛型。

#2


12  

http://msdn.microsoft.com/en-us/library/ms235298.aspx gives a rough overview of the syntax changes.

http://msdn.microsoft.com/en-us/library/ms235298.aspx给出语法变化的粗略概述。

#3


1  

Managed C++ (Managed Extensions for C++) is a set of microsoft specific keywords used with standard C++ syntax to allow compile managed code. IT was designed such that programmers could start using .NET as fast as possible and made porting native code to .NET platform very easy. It used IJW (it just works) priciple, which made programming porting to .NET easier, but it also had lot of flaws.

托管c++ (c++的托管扩展)是一组microsoft特定的关键字,与标准c++语法一起使用,以允许编译托管代码。它的设计使得程序员可以尽可能快地使用。net,并将本地代码移植到。net平台上非常容易。它使用了IJW(它只工作)原理,这使得移植到。net的程序更容易,但是它也有很多缺陷。

C++/CLI is a new language. It solved lot of problems of Managed C++, made .NET programming more powerful and is accepted as standard, but also introduces new syntax, new keywords, and is more more different from unmanaged C++ than older Managed C++.

c++ /CLI是一种新的语言。它解决了托管c++的许多问题,使. net编程变得更强大并被接受为标准,但也引入了新的语法、新的关键字,与非托管c++相比,它与非托管c++的区别更大。