The C language introduces two large new things for C language, one is object-oriented (the specific class is class), and the template technology (template programming or generic program is coming in very popular technology, in C # Although there is no support for generic programming, it is believed that this feature will be added in the future), and the template is a complicated part of C , but as a real C programmer, this is important. Especially the mastery of the C standard library is particularly important. Don't just start the various wizards and designers in the VC when you start. Because many of the code that relies on the development environment will make us confused, it is not conducive to our learning C language itself. My suggestion is to generate an empty console project and then add a file to it. Such as a simple console program: #include #include using namespace std; int main () {list coll; for (char c = 'a'; c <= 'z'; c) {COLL.PUSH_BACK (C );} list :: const_iterator pos; for (POS = COLL.BEGIN (); POS! = coll.end (); POS) {cout << * pOS << '';} cout << endl; return 0;} The interpretation of Using Namespace Std: The so-called Namespace is a variety of visible ranges of the identifier. All identifiers in the C standard library are defined in a namespace called STD. Due to the NameSpace concept, there can be three options when using any identifier of the C standard library, you can specify the identifier. For example std :: ostream rather than ostream. The full statement is as follows: std :: cout << std :: hex << 3.4 << std :: end1; 2, using the use of keywords. Using std :: cout; using std :: endl; the above program can be written as cout << std :: hex << 3.4 << endl; 3, the most convenient is to use the use of namespace std; this namespace STD defined all the identity defined in the STD Valid (exposure). It seems that they are declared as global variables. Then, the above statement can be written as follows: cout << Hex << 3.4 << endl; this program uses the standard template library, print characters a ~ z on the screen, where the MAIN function is marked only two is the C Standards Committee Accepted, only the following two ways are compliant with C standards, which is portable. That is: int main () {} and int main (int Argc, char * argv []) {} C defines an implicit return 0 at the end of Main (); but must be explicitly written in VC. Scriptures. You can compile RETURN in the BCB. The container in STL is used in this program: linked list. First insert 26 letters into the list, then from the traversal chain table, output characters. It is recommended to learn the template library.
Try writing a console program that embodies the inheritance, function overloading, dynamic polymorphism (through virtual function), data package, C standard library. Recommended book "Thinking In C " (if you have energy, you can directly read the original version) "Essential C " first solve a problem: Why learning C ? I think it is interested in learning new things in the software development. In addition to the livelihood, learning new things should be guided by interest. I am learning C for myself is: I can't waste halfway! At first, it was an interest-driven. Later, it was a livelihood, and finally returned to interest. After all, I have been having fun, this is enough. Solving motive problems before learning a new thing. Even if we have encountered too many confuses and pain on the road to C , we have made hardships for your beliefs, we know what you are doing, know what you are pursuing. What kind of development is C suitable for? C is a large language widely used in industrial software development. It has high complexity and ability to solve problems. C is not only a very value in development, but also has a high value in the academic world. Articles about C should be able to describe the voyage of the smoke. C world-class classic books are also countless. However, the development language is so prosperous, even Microsoft has also launched a new development language C #. A undeniable reality is that in the low-order programming field, C squeezed C and also suffering from the strong rebound of C, it is said that it is said to be a Microsoft operating system source code, many of which is a C language. In the high-order programming field, Java and C # are constantly eating C sites. Perhaps Java and C # frenzy will eventually force C to return to this bite - returning to it with fundamental advantages: low-level system program design, high-level high-performance application design, embedded program design, general program design, numerical scientific calculations, etc. . As such, I think this is not a good thing. The high performance and large-scale numerical calculations required by the power system software are being good at C . For Nanrui and Luneng I have contacted, many software involved in power systems such as PAS, etc., are developed with C . Develop this position in the power system software, C is very useful. C attracts such intellectual investment, so that excellent works in this field, including heavyweight software products, libraries, and books, etc. On the Parent Bjarne Stroustrustroup of C , there is some (all or most) systems, applications, and libraries written in C . Here are some examples (from glory website): o Adobe Systems: All major applications are developed using C , such as Photoshop & ImageReady, Illustrator, and Acrobat, etc. O Maya: Does the "Spider Man", "Refers to the Rings King"? What software is used? That's right, it is Maya. o Amazon.com: Develop large e-commerce software using C . o Apple: Some important "parts" are written in C .