The so-called C ++ compiler is actually not very difficult. It is a compilation environment highly compatible with standardized C ++. Only such compilers are the most meaningful tools for C ++ developers, especially for learners of programming languages.
Someone often asks me (Bjarne Stroustrup) If I can recommend a C ++ compiler. However, I cannot make such recommendations, because it is very easy to get involved in a commercial war. Similarly, I don't know every C ++ compiler, because they have many similarities. I use six C ++ compilers to complete the basic needs, but on the surface, they are all uneven.
I recommend that people use a compiler that is strictly consistent with the standard. If you do this, you can avoid situations where the compiler is not close to the ISO standard and the standard library cannot be used. Recently, compilers from major C ++ vendors do this.
If you are a newbie and do not know how to view the compiler structure, use the following code:
- #include<iostream>
- #include<string>
-
- using namespace std;
-
- int main()
- {
- string s;
- cout << "Please enter your first name followed by a newline\n";
- cin >> s;
- cout << "Hello, " << s << '\n';
- return 0; // this return statement isn't necessary
- }
If the compiler cannot process this simple program, it cannot be used as a candidate compiler for learning the Standard C ++ language. Here is a long article about compiler consistency and boost.org 'S Compiler status. Consistency is a part of the compiler quality (the quality of the generated code.
Error messages, compilation speed, tool integration, support, backward compatibility, and other important aspects), but they are a very important part. Compiler vendors limit program simplification and use of language extensions and non-standard features, and prevent you from choosing a new compiler vendor.
The current compilers are embedded in the frameworks of software development tools and libraries. These frameworks, environments, and libraries are very useful, but remember that the use of these tools will limit you to a single vendor and to critical execution performance.
When searching for the C ++ compiler on the Internet, you can find information hidden behind several product names. In fact, using google.com, I am very lucky to find the C ++ compiler information, which is much better than searching from the vendor's directory. Here, I chose a list of C ++ compiler names, regardless of their market conditions.
- How to Write C ++ project development and project plan correctly
- Summary Notes on learning and exploring C ++ library functions
- In-depth demonstration of high security of C ++
- Describes in detail how to accurately Write C ++ languages.
- In-depth demonstration of high security of C ++