与C#或.Net相比,c ++编码的主要区别是什么 [英] what is the main difference from c++ coding comparing with C# or .Net
本文介绍了与C#或.Net相比,c ++编码的主要区别是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
#include< iostream.h>
int main()
{
cout<< ;Hello World;
返回0;
}
#include<iostream.h>
int main()
{
cout<<"Hello World";
return 0;
}
推荐答案
这不是一个真正的问题:你无法将C ++(这是一种语言)与.NET(这是一个框架)进行比较。你不在 .NET中编写程序 :你用兼容的语言编写程序 for .NET:有时可能是C#,VB ...或C ++。
C#是.NET的一种语言,因为它是为它创建的,它专门用于生成.NET兼容程序(如果忽略单声道等),而C ++是最初从C派生的语言,可用于.NET,但也可用于生成支持其他框架(如MFC)的本机应用程序。
你甚至无法轻易地比较C#和C ++:它们是非常不同的语言,它们具有相似的语法 - 直到某一点。如果您尝试在C#中编写C ++代码,它可能会编译 - 但它可能无法正常工作,反之亦然。
This isn't really a question: you can't compare C++ (which is a language) against .NET (which is a framework). You don't write programs in .NET: you write programs for .NET, in a compatible language: which may be C#, VB ... or C++ sometimes.
C# is a language for .NET in that it was created for it, and it used exclusively to produce .NET compatible programs (if you ignore mono, etc.) while C++ is a language originally derived from C which can be use for .NET, but can also be used to produce native applications which support other frameworks such as MFC.
You can't even compare C# and C++ that easily: they are very different languages which share a similar looking syntax - up to a point. If you try to code C++ in C# it may compile - but it probably won't work too well, and vice versa.
查看以下URL以进行编程语言之间的比较:
http://en.wikipedia.org/wiki/Comparison_of_programming_languages
Check out the following URL for comparisons between programming languages:
http://en.wikipedia.org/wiki/Comparison_of_programming_languages
>
这篇关于与C#或.Net相比,c ++编码的主要区别是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文