• <bdo id='Pov0c'></bdo><ul id='Pov0c'></ul>

    <legend id='Pov0c'><style id='Pov0c'><dir id='Pov0c'><q id='Pov0c'></q></dir></style></legend>
    <i id='Pov0c'><tr id='Pov0c'><dt id='Pov0c'><q id='Pov0c'><span id='Pov0c'><b id='Pov0c'><form id='Pov0c'><ins id='Pov0c'></ins><ul id='Pov0c'></ul><sub id='Pov0c'></sub></form><legend id='Pov0c'></legend><bdo id='Pov0c'><pre id='Pov0c'><center id='Pov0c'></center></pre></bdo></b><th id='Pov0c'></th></span></q></dt></tr></i><div id='Pov0c'><tfoot id='Pov0c'></tfoot><dl id='Pov0c'><fieldset id='Pov0c'></fieldset></dl></div>

      1. <tfoot id='Pov0c'></tfoot>

        <small id='Pov0c'></small><noframes id='Pov0c'>

        C++ 与 C++.NET 之间的主要区别是什么?

        时间:2023-10-05
        <tfoot id='Vtdyi'></tfoot>

              <legend id='Vtdyi'><style id='Vtdyi'><dir id='Vtdyi'><q id='Vtdyi'></q></dir></style></legend>
              <i id='Vtdyi'><tr id='Vtdyi'><dt id='Vtdyi'><q id='Vtdyi'><span id='Vtdyi'><b id='Vtdyi'><form id='Vtdyi'><ins id='Vtdyi'></ins><ul id='Vtdyi'></ul><sub id='Vtdyi'></sub></form><legend id='Vtdyi'></legend><bdo id='Vtdyi'><pre id='Vtdyi'><center id='Vtdyi'></center></pre></bdo></b><th id='Vtdyi'></th></span></q></dt></tr></i><div id='Vtdyi'><tfoot id='Vtdyi'></tfoot><dl id='Vtdyi'><fieldset id='Vtdyi'></fieldset></dl></div>
                <bdo id='Vtdyi'></bdo><ul id='Vtdyi'></ul>

                <small id='Vtdyi'></small><noframes id='Vtdyi'>

                  <tbody id='Vtdyi'></tbody>
                • 本文介绍了C++ 与 C++.NET 之间的主要区别是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  可能的重复:
                  托管 C++ 和 C++/CLI 有什么区别?
                  CLI/C++ 到底是什么?它与普通"c++ 有何不同?

                  我怀疑区分 C++ 和 C++.NET.

                  I am in doubt of distinguishing between C++ and C++.NET.

                  C++ 是非托管代码而 C++.NET 是托管代码吗?

                  Is that right C++ is unmanaged code and C++.NET is managed code?

                  我需要用 C++ 为一个项目编程.为了更好地构建 GUI,我更喜欢使用 C++.NET.

                  I need to program for a project in C++. For better building the GUI, I would prefer to use C++.NET.

                  我还有一个普通的 C++ 库(非托管 C++ DLL 文件),是否可以将它用作 C++.NET 项目中的普通 DLL 库?

                  I also have another plain C++ library (unmanaged C++ DLL file), will it be possible to use it as a normal DLL library in the C++.NET project?

                  推荐答案

                  C++ 是非托管代码,C++.NET 是托管代码.

                  Is that right C++ is unmanaged code and C++.NET is managed code.

                  没有C++.NET"这样的东西.有 C++/CLI,它基本上是带有 Microsoft 扩展的 C++,允许您编写面向 .NET 框架的代码.C++/CLI 代码编译为 CLR 字节码,并像 C# 一样在虚拟机上运行.我假设您实际上是在谈论 C++/CLI.

                  There's no such thing as "C++.NET". There's C++/CLI, which is basically C++ with Microsoft extensions that allow you to write code targeting the .NET framework. C++/CLI code compiles to CLR bytecode, and runs on a virtual machine just like C#. I'll assume you're actually talking about C++/CLI.

                  关于这一点,可以说标准 C++ 是非托管的,而 C++/CLI 是托管的,但这是 Microsoft 的术语.除非与 C++/CLI 进行比较,否则在谈论标准 C++ 时,您永远不会看到非托管"一词以这种方式使用.

                  With respect to that, one can say standard C++ is unmanaged and C++/CLI is managed, but that's very much Microsoft terminology. You'll never see the term "unmanaged" used this way when talking about standard C++ unless in comparison with C++/CLI.

                  标准 C++ 和 C++/CLI 都可以由同一个 Visual C++ 编译器编译.前者是 VC++ 编译器的默认设置,而后者需要编译器开关才能编译.

                  Both standard C++ and C++/CLI can be compiled by the same Visual C++ compiler. The former is the default on VC++ compilers, while a compiler switch is needed to make it compile in latter mode.

                  我需要用 C++ 为一个项目编程.为了更好地构建 GUI,我更愿意使用 C++.NET.

                  I need to program for a project in C++. For better building the GUI, I would prefer to use C++.NET.

                  您可以使用 C++ 和 C++/CLI 构建 GUI 程序.只是更难,因为标准 C++ 中没有一个标准库来像 .NET 框架那样构建 GUI,但是有很多项目,比如 Qt 和 wxWidgets 提供 C++ GUI 框架.

                  You can build GUI programs in C++ just as well as C++/CLI. It's just harder because there isn't a standard library in standard C++ for building GUI like the .NET framework has, but there are lots of projects out there like Qt and wxWidgets which provide a C++ GUI framework.

                  我还有另一个普通的 C++ 库(非托管 C++ dll),会不会是可以在C++.NET项目中作为普通的dll库使用吗?

                  I also have another plain C++ library (unmanaged C++ dll), will it be possible to use it as a normal dll library in the C++.NET project?

                  是的.处理不同的标准 C++ 数据类型和 .NET 数据类型可能需要一些额外的工作,但您当然可以使其工作.

                  Yes. It might take some extra work to deal with the different standard C++ data types and .NET data types, but you can certainly make it work.

                  这篇关于C++ 与 C++.NET 之间的主要区别是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:带有字符串变量指令的 C/C++ 内联汇编器 下一篇:如何在 C++11 中传递和执行匿名函数作为参数?

                  相关文章

                  最新文章

                • <i id='yqv6B'><tr id='yqv6B'><dt id='yqv6B'><q id='yqv6B'><span id='yqv6B'><b id='yqv6B'><form id='yqv6B'><ins id='yqv6B'></ins><ul id='yqv6B'></ul><sub id='yqv6B'></sub></form><legend id='yqv6B'></legend><bdo id='yqv6B'><pre id='yqv6B'><center id='yqv6B'></center></pre></bdo></b><th id='yqv6B'></th></span></q></dt></tr></i><div id='yqv6B'><tfoot id='yqv6B'></tfoot><dl id='yqv6B'><fieldset id='yqv6B'></fieldset></dl></div>
                  <legend id='yqv6B'><style id='yqv6B'><dir id='yqv6B'><q id='yqv6B'></q></dir></style></legend>
                    <bdo id='yqv6B'></bdo><ul id='yqv6B'></ul>

                    <small id='yqv6B'></small><noframes id='yqv6B'>

                      <tfoot id='yqv6B'></tfoot>