C++ 和 Visual C++ 有什么区别?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/969297/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-27 18:10:06  来源:igfitidea点击:

What is the difference between C++ and Visual C++?

c++visual-c++

提问by

What is the difference between C++ and Visual C++?

C++ 和 Visual C++ 有什么区别?

I know that C++ has the portability and all, so if you know C++ how is it related to Visual C++? Is Visual C++ mostly for online apps? Would Visual Basic be better for desktop applications?

我知道 C++ 具有可移植性等等,所以如果您了解 C++,它与 Visual C++ 有什么关系?Visual C++ 主要用于在线应用程序吗?Visual Basic 更适合桌面应用程序吗?

回答by Pim

C++ is a standardized language. Visual C++ is a product that more or less implements that standard. You can write portable C++ using Visual C++, but you can also use Microsoft-only extensions that destroy your portability but enhance your productivity. This is a trade-off. You have to decide what appeals most to you.

C++ 是一种标准化语言。Visual C++ 是或多或少实现了该标准的产品。您可以使用 Visual C++ 编写可移植的 C++,但您也可以使用 Microsoft 专用的扩展,这会破坏您的可移植性但提高您的生产力。这是一种权衡。你必须决定什么对你最有吸引力。

I've maintained big desktop apps that were written in Visual C++, so that is perfectly feasible. From what I know of Visual Basic, the main advantage seems to be that the first part of the development cycle may be done faster than when using Visual C++, but as the complexity of a project increases, C++ programs tend to be more maintainable (If the programmers are striving for maintainability, that is).

我维护了用 Visual C++ 编写的大型桌面应用程序,因此这是完全可行的。根据我对 Visual Basic 的了解,主要优势似乎是开发周期的第一部分可能比使用 Visual C++ 时完成得更快,但是随着项目复杂性的增加,C++ 程序往往更易于维护(如果程序员正在努力实现可维护性,即)。

回答by Daniel Daranas

C++is a general-purpose programming language. It is regarded as a middle-level language, as it comprises a combination of both high-level and low-level language features. It was developed by Bjarne Stroustrup starting in 1979 at Bell Labs as an enhancement to the C programming language and originally named "C with Classes". It was renamed to C++ in 1983.

C++是一种通用编程语言。它被视为中级语言,因为它包含高级和低级语言特征的组合。它由 Bjarne Stroustrup 于 1979 年在贝尔实验室开发,作为对 C 编程语言的增强,最初命名为“C with Classes”。它在 1983 年更名为 C++。

C++ is widely used in the software industry. Some of its application domains include systems software, application software, device drivers, embedded software, high-performance server and client applications, and entertainment software such as video games. Several groups provide both free and proprietary C++ compiler software, including the GNU Project, Microsoft, Intel, Borland and others.

C++广泛应用于软件行业。它的一些应用领域包括系统软件、应用软件、设备驱动程序、嵌入式软件、高性能服务器和客户端应用程序以及视频游戏等娱乐软件。有几个团体提供免费和专有的 C++ 编译器软件,包括 GNU 项目、微软、英特尔、Borland 等。



Microsoft Visual C++(often abbreviated as MSVC or VC++) is an integrated development environment (IDE)product from Microsoft for the C, C++, and C++/CLI programming languages. MSVC is proprietary software; it was originally a standalone product but later became a part of Visual Studioand made available in both trialware and freeware forms. It features tools for developing and debugging C++ code, especially code written for Windows API, DirectX and .NET Framework.

Microsoft Visual C++(通常缩写为 MSVC 或 VC++)是Microsoft 为 C、C++ 和 C++/CLI 编程语言开发集成开发环境 (IDE)产品。MSVC 是专有软件;它最初是一个独立的产品,但后来成为Visual Studio的一部分,并以试用软件和免费软件的形式提供。它具有用于开发和调试 C++ 代码的工具,尤其是为 Windows API、DirectX 和 .NET Framework 编写的代码。



So the main difference between them is that they are different things. The former is a programming language, while the latter is a commercial integrated development environment (IDE).

所以它们之间的主要区别在于它们是不同的东西。前者是一种编程语言,而后者是一种商业集成开发环境(IDE)。

回答by Silfverstrom

C++ is a programming language and Visual C++ is an IDE for developing with languages such as C and C++.

C++ 是一种编程语言,而 Visual C++ 是一种用于使用 C 和 C++ 等语言进行开发的 IDE。

VC++ contains tools for, amongst others, developing against the .net framework and the Windows API.

VC++ 包含用于针对 .net 框架和 Windows API 进行开发的工具。

回答by Artur Soler

C++ is a language and Visual C++ is a compiler for that language. Certainly, it (and every other compiler) introduces tiny modifications to the language, but the language recognized is mainly the same.

C++ 是一种语言,Visual C++ 是该语言的编译器。当然,它(以及所有其他编译器)对语言进行了微小的修改,但识别的语言基本相同。

回答by dreamlax

VC++ is not actually a language but is commonly referred to like one. When VC++ is referred to as a language, it usually means Microsoft's implementation of C++, which contains various knacks that do not exist in regular C++, such as the __superkeyword. It is similar to the various GNU extensions to the C language that are implemented in GCC.

VC++ 实际上不是一种语言,但通常被称为类似语言。当VC++被称为一种语言时,通常是指微软对C++的实现,其中包含了各种常规C++中不存在的诀窍,比如__super关键字。它类似于在 GCC 中实现的 C 语言的各种 GNU 扩展。

回答by Wim ten Brink

What is the difference between c++ and visaul c++?

c++ 和visaul c++ 有什么区别?

Visual C++ is an IDE. There's also C++Builder from Embarcadero. (Used to be Borland.) There are also a few other C++ IDE's.

Visual C++ 是一个 IDE。还有来自 Embarcadero 的 C++Builder。(曾经是 Borland。)还有一些其他的 C++ IDE。

I know that c++ has the portability and all so if you know c++ how is it related to visual c++?

我知道 c++ 具有可移植性,所以如果你知道 c++,它与 Visual c++ 有什么关系?

C++ is as portable as the libraries that you use in your C++ application. VC++ has some specialized libraries to use with Windows, so if you use those libraries in your C++ application, you're stuck with Windows. But a simple "Hello, World" application that just uses the console as output can be compiled on Windows, Linux, VMS, AS/400, Smartphones, FreeBSD, MS-DOS, CP80 and almost any other system for which you can find a C++ compiler. Injteresting fact: at http://nethack.org/you can download the C sourcecode for an almost antique game, where you have to walk through a bunch of mazes, kick some monsters around, find treasures and steal some valuable amulet and bring that amulet back out. (It's also a game where you can encounter your characters from previous, failed attempts to get that amulet. :-) The sourcecode of NetHack is a fine example of how portable C (C++) code can be.

C++ 与您在 C++ 应用程序中使用的库一样可移植。VC++ 有一些专门用于 Windows 的库,因此如果您在 C++ 应用程序中使用这些库,您就会被 Windows 困住。但是,一个仅使用控制台作为输出的简单“Hello, World”应用程序可以在 Windows、Linux、VMS、AS/400、智能手机、FreeBSD、MS-DOS、CP80 和几乎任何其他系统上编译C++编译器。有趣的事实:在http://nethack.org/你可以下载一个几乎古老的游戏的 C 源代码,在那里你必须穿过一堆迷宫,踢一些怪物,找到宝藏,偷一些有价值的护身符,然后把那个护身符带回来。(这也是一个游戏,您可以在其中遇到您之前尝试获得该护身符失败的角色。:-) NetHack 的源代码是 C (C++) 代码可移植性的一个很好的例子。

Is visual c++ mostly for online apps?

Visual C++ 主要用于在线应用程序吗?

No. But it can be used for online apps. Actually, C# is used more often for server-side web applications while C++ (VC++) is used for all kinds of (server) components that your application will be depending upon.

不可以。但它可以用于在线应用程序。实际上,C# 更常用于服务器端 Web 应用程序,而 C++ (VC++) 用于您的应用程序将依赖的各种(服务器)组件。

Would visual basic be better for desktop applications?

Visual Basic 会更适合桌面应用程序吗?

Or Embarcadero Delphi. Delphi and Basic are languages that are easier to learn than C++ and both have very good IDE's to develop GUI applications with. Unfortunately, Visual Basic is now running on .NET only, while there are still many developers who need to create WIN32 applications. Those developers often have to choose between Delphi or C++ or else convince management to move to .NET development.

或Embarcadero Delphi。Delphi 和 Basic 是比 C++ 更容易学习的语言,并且都具有非常好的 IDE 来开发 GUI 应用程序。不幸的是,Visual Basic 现在只在 .NET 上运行,而仍然有许多开发人员需要创建 WIN32 应用程序。这些开发人员通常必须在 Delphi 或 C++ 之间做出选择,否则说服管理层转向 .NET 开发。

回答by glider

Key differences:

主要区别:

C++is a general-purpose programming language, but is developed from the originally C programming language. It was developed by Bjarne Stroustrupat Bell Labs starting in 1979. C++ was originally named C with Classes. It was renamed C++ in 1983.

C++一种通用的编程语言,但它是从最初的 C 编程语言发展而来的。它由贝尔实验室的Bjarne Stroustrup于 1979 年开始开发。C++ 最初被命名为 C with Classes。它在 1983 年更名为 C++。

Visual C++, on the other hand, is not a programming language at all. It is in fact a development environment. It is an “integrated development environment (IDE)product from Microsoft for the C, C++, and C++/CLI programming languages.” Microsoft Visual C++, also known as MSVC or VC++, is sold as part of the Microsoft Visual Studio app.

另一方面,Visual C++根本不是一种编程语言。它实际上是一个开发环境。它是来自 Microsoft 的用于 C、C++ 和 C++/CLI 编程语言的集成开发环境 (IDE)产品”。Microsoft Visual C++,也称为 MSVC 或 VC++,作为 Microsoft Visual Studio 应用程序的一部分出售。