各种C ++风格之间的区别 [英] Difference between various flavours of C++

查看:68
本文介绍了各种C ++风格之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


有什么区别
Win32控制台应用程序..

VS

CLR控制台应用程序..

VS

C ++/CLI

都希望相同..

解决方案

SA绝对正确.只是添加一件事. C ++是一种不受Microsoft控制的标准所控制的语言. C ++没有味道",因为只有一种语言称为C ++,味道"是由编译器程序员在做不好的工作时创建的. VC6曾经是其中最差的,但如今MS已完全符合标准.您列出的所有内容都是C ++之上的某种库.确实有三个选项,而您列出了两个.

Win 32实际上比C ++多了C,尽管C ++是基于C构建的,但是您可以将C API与C一起使用. Win32控制台应用程序大概是C ++中的控制台应用程序,不支持MFC.

MFC是用于使用C ++编写Windows应用程序的旧Microsoft库.如果必须使用C ++,这是IMO的合理选择.

C ++/CLI是具有到.NET桥梁的标准C ++.因此,您可以使用winforms编写Windows应用程序,尽管我认为没有理智的理由要使用C ++而不是C#来执行此操作. C ++/CLI的主要用途是将现有的C ++应用程序桥接到.NET代码.您列出了无与伦比的物品:

Win32控制台应用程序:这仅是Win32项目的应用程序选项.如果简单地说:显示默认控制台".

VS :Microsoft Visual Studio的缩写;适用于多种语言(不仅是C ++)的IDE.用"VS"表示您是"versus"吗?

CLR控制台应用程序:与Win32控制台应用程序相同,仅适用于以C ++/CLI,C#,VB.NET和其他语言编写的CLR项目.

C ++/CLI :实际上是一种与C ++完全不同的语言,源于C ++,C ++用于CLI,具有不同的语法,并在ECMA下进行了标准化;将C ++/CLI与C ++耦合的主要事实是,这两种语言可以在同一项目中使用并且可以彼此使用''声明.

—SA


what are differences between

Win32 Console App..

VS

CLR Console App..

VS

C++/CLI

all are looking to be same..

解决方案

SA is absolutely correct. Just to add one thing. C++ is a language governed by a standard that is not under Microsoft''s control. There are NO ''flavours'' of C++, because there is only one language called C++, ''flavours'' are created by compiler programmers doing a bad job. VC6 used to be the worst of these, but MS is quite standards compliant nowadays. Everything you listed, is some sort of library on top of C++. There are really three options, and you listed two.

Win 32 is actually C more than C++, although as C++ is built on C, you can use C APIs with it. A Win32 console app presumably is a console app in C++ that has no MFC support.

MFC is the old Microsoft library for writing windows apps with C++. It''s the logical choice IMO, if you must use C++.

C++/CLI is standard C++ with a bridge to .NET. Thus you can use winforms to write windows apps, although I see no sane reason to use C++ and not C# to do this. The main use for C++/CLI is to bridge existing C++ apps to .NET code.


Those are not different "flavors of C++". You list incomparable items:

Win32 Console Application: this is no more than an application option for a Win32 project. If simply says: "show default console".

VS: abbreviation for Microsoft Visual Studio; IDE for many languages, not just C++. By "VS", did you mean "versus"?

CLR Console Application: same as Win32 Console Application only for CLR projects written in C++/CLI, C#, VB.NET and other languages.

C++/CLI: actually a language very different from C++ and derived from C++, C++ for CLI with different syntax, standardized under ECMA; the main thing that couples C++/CLI with C++ is the fact that these two languages can be used in the same project and use each others'' declarations.

—SA


这篇关于各种C ++风格之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆