<i id='AVEx3'><tr id='AVEx3'><dt id='AVEx3'><q id='AVEx3'><span id='AVEx3'><b id='AVEx3'><form id='AVEx3'><ins id='AVEx3'></ins><ul id='AVEx3'></ul><sub id='AVEx3'></sub></form><legend id='AVEx3'></legend><bdo id='AVEx3'><pre id='AVEx3'><center id='AVEx3'></center></pre></bdo></b><th id='AVEx3'></th></span></q></dt></tr></i><div id='AVEx3'><tfoot id='AVEx3'></tfoot><dl id='AVEx3'><fieldset id='AVEx3'></fieldset></dl></div>
    • <bdo id='AVEx3'></bdo><ul id='AVEx3'></ul>
  1. <small id='AVEx3'></small><noframes id='AVEx3'>

    1. <legend id='AVEx3'><style id='AVEx3'><dir id='AVEx3'><q id='AVEx3'></q></dir></style></legend>
    2. <tfoot id='AVEx3'></tfoot>

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

      时间:2023-07-01

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

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

              <bdo id='Yqwei'></bdo><ul id='Yqwei'></ul>
              • 本文介绍了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 之间的主要区别是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                相关文章

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

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

                  1. <tfoot id='P3X1B'></tfoot>
                    • <bdo id='P3X1B'></bdo><ul id='P3X1B'></ul>