I bought this C ++ PRIMER that day and learned a little bit about programming in linux through careful learning. This is what I wanted to learn a long time ago, now let's start learning the C ++ language for detailed learning and analysis. Now let's explore the mysteries of the C ++ language.
In Linux, C ++ follows the ISO/IEC 14882: 2003 standard, that is, the standard C ++ language. If you are referring to multiple modules, it is very simple, there should be no difference with VC ++, In a header file. h) Declare some functions, classes, and variables. include this header file in the other two modules. One of them defines the declared function and the other can call the declared function. Of course, the same applies to more modules.
If you are referring to the Link Library, the dynamic link library in windows is. dll in linux. so static link library is. a), it is simpler in linux, just compile the module that defines the function separately. Assume that there are three modules: main. cpp, hello. cpp, helllo. h, in which helllo. h declares the hello () function, hello. cpp defines this function, while main. cpp can compile the function as follows:
- g++ -shared hello.cpp -o libhello.so
- g++ -L./ -lhello main.cpp -o main.out
Among them,-shared indicates compiling to a dynamic link library;-L. \ indicates searching for the library to be linked in the current directory. indicates the current directory);-lhello indicates that the compiler has an implicit naming rule when searching for a dynamic connected library, that is, add lib before the given name, followed. so to determine the library name. Of course, the second command can also be written as follows:
This is probably what I know. As for C: B, this IDE has never been used. You can set the compilation option somewhere. In fact, from the perspective of the author's surrounding environment, this is also true, although the growth speed is not as fast as that of Java and other languages, the number of programmers using C ++ is still growing. This shows that the C ++ language is still keeping up with the "trend" and can still meet the needs of programmers and practical applications.
Currently, C ++ does not have much market for Web development. In enterprise applications, Java and. NETC # are among the most important members. C ++ still has a place. C/C ++ applications are mostly used in system-level development. These three languages have their own characteristics. In general, the application of C ++ is concentrated in the following main fields.
Gaming: the efficiency of C ++ is a very important reason. Scientific Computing: in the field of scientific computing, FORTRAN is one of the most widely used languages. However, in recent years, C ++ has been widely used in this field thanks to its advanced numerical computing libraries and generic programming.
- How to better set Dev C ++
- Analysis on the use and learning of C ++ Compiler
- Brief description of struct ideology in C ++
- C ++ programming language Overview
- Measure the test taker's knowledge about the differences between C ++, C #, and Java.
Network Software: C ++ has many mature libraries for network communication. Among them, the most representative is the cross-platform and heavyweight ACE library, this database can be said to be one of the most important achievements of the C ++ language and has been applied to many important enterprises, departments, and even the military.
Distributed applications. Operating system: in this field, C ++ is the main programming language. However, with its compatibility with C, the object-oriented nature has also begun to emerge in this field. Device Drivers: this is also because of efficiency. Mobile handheld devices. Embedded system. Education and Scientific Research. Some industrial applications. Other applications.