Is there a difference between C++ from GCC and C++ from Visual Studio?

Asked

Viewed 571 times

4

I already programmed in C++ compiling with GCC and when I started using Visual Studio I noticed that it has support for C++, but the implementation is aimed at the platform . Net.

There is a difference between these two versions of C++ in a matter of programming time, processing speeds etc.?

1 answer

6


There are two C++ in Visual Studio. The . NET is C++/CLI, although it is still very similar to C++, it does not follow the standard language. In fact he is used only to facilitate. NET code communication with native C code++. Just to cite examples of difference he wears a Garbage Collector and does not permit multiple inheritance.

Already the native C++ that is also present is ISO compliant and it’s essentially the same as the GCC. Of course there are some implementation differences where the default leaves this open, where are clear extensions and where each prioritizes. The GCC may have some new standard functions (C++17) or even the officer (C++14) that the Visual C++ does not support yet, but will support, and vice versa (now C++ 14 VS already supports everything, I think everything from C++17 as well and even C++20 was well ahead when I edited here, hopefully C++23). There are few things, but it is good to consult before using the latest news. The rest is the same. A code written for one must work on the other if taken some proper care.

Of course, each one can have its own optimizations and functionalities, provided that it interprets the standard code and manages the same binary model meeting the requirements set out in the standard. The tools available for each are quite different.

Comparative table.

Understand What is a programming language, IDE and compiler?

Browser other questions tagged

You are not signed in. Login or sign up in order to post.