简体   繁体   中英

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

Well here's a rather stupid question. Is Visual C++ JUST an IDE?? Or is it a language on its own for win32? What exactly would be the difference between the two? This I ask because I was trying out some of my old C++ code on VC++ 2008 and it wouldn't compile.

Visual C++ can be many things, including:

  1. Microsoft's C++ compiler (cl.exe, link.exe etc)
  2. The IDE (Visual Studio in C++ mode)
  3. The C runtime (MSVCRT)
  4. Other libraries (less so): MFC, ATL

As for compiling old C++ code: Visual Studio is now a fairly compliant C++ compiler. This was not always the case, such as with Visual C++ 6 or earlier. It is likely your code is not standards compliant or uses deprecated behavior, which simply doesn't work on newer compilers.

Visual C++ is unfortunately a poor C compiler, as it does not support C99 (and never will), unless features overlap between C++ and C99. The most notable issue for many people is the lack of stdint.h.

Visual C++ is an IDE. It compiles standard C++ code. However, every C++ compiler essentially creates its own version of C++. Few compilers are entirely compliant with the current standard, and they may or may not add features from the upcoming standard. In addition, they sometimes add their own extensions to the language. So, there's always a portiability risk when compiling C++ code with different compilers. However, recent versions of Visual C++ are fairly close to standards compliant, and most things which compile with it will compile with other popular compilers like gcc/g++ (and vice versa).

VS2008 includes both standard C++ and Microsoft's Managed C++. The standard C++ is mostly compliant with C++03 (at least that was the intent). Managed (ie non standard) C++ is for developing .NET applications and is not (nor was it intended to be) compliant with any C++ standard.

You might want to make sure that you didn't accidentally select Managed C++ when you ported your app.

Visual C++ is the name of Microsoft's IDE and compiler for the C++ programming language. Note, though, that -- like many C++ implementations -- Visual C++ has certain extensions that are not provided by C++ as well as certain areas where it fails to fully conform to the ISO C++ language standard.

VS C++ is essentially a specific type of C++.

New VS versions include newer functionality, both extensions(such as CLI), and also from newer standards, such as C++0x(type inference, etc.).

Some of that functionality might accidentally cause your code to stop working, or you could be relying on specific Visual Studio bugs that were meanwhile fixed.

Visual C++ contains C++ compiler which is an implementation of C++ Language Standard. Visual C++ 6 is a not conformant implementation. Visual C++ 2008 is much better. There are some changes from VC++6 to VC++2008 that's why your old code could not compile. There're some flags that allows to compile VC++6 code in VC++2008.

Here is a good question already on SO that could be helpful.

我想 Visual C++ 包括微软的库扩展。

C++ is a programmable, independent programming language, in contrast to Visual C++, which is built-on C++. Visual C++ is a programming language, like C++, but to date, only Visual Studio has the power to run Visual C++, with gcc , you can use C++ literally anywhere. Generally, Visual C++ offers more applications (software based) to run on Linux, Windows or perhaps MacOS Android ie, however, unfortunately C++ is just console based. In the selection of using both, for Software Based applications, Visual C++ is preferred, since it offer more Windows, Android or even Gaming tools. However, on Industrial basis, developing console based apps, or Hardware oriented applications, C++ is better then Visual C++. It depends on the choice, but usually, the main difference is their intended application to use for.

Edit: I do not mean that C++ is not at all useful for GUI, it is productive for GUI, but for simple projects, C++ GUI is waste of time, compare able to Visual C++

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM