11.What makes a bad C++ Program ?
The natural interface between source files in C/C++ are header files. Each time a header file is modified, all source files that include the header file should recompile their code. Header files are slow because they are textual and context-dependent as a consequence of the preprocessor.[11] C only has limited amounts of information in header files, the most important being struct declarations and function prototypes. C++ stores its classes in header files and they not only expose their public variables and public functions (like C with its structs and function prototypes) but also their private functions. This forces unnecessary recompiles of all source files that include the header file, each time when changing these private functions. This problem is magnified where the classes are written as templates, forcing all of their code into the slow header files, which is the case with the whole C++ standard library. Large C++ projects can therefore be relatively slow to compile.[12] The problem is largely solved by precompiled headers in modern compilers or using the module system that was added in C++20; future C++ standards are planning to expose the functionality of the standard library using modules
12.Why Should you use a Language like C++ ?
C++ is the language that is used everywhere but mainly in systems programming and embedded systems. Here system programming means for developing the operating systems or drivers that interface with Hardware. Embedded system means things that are automobiles, robotics, and appliances. It is having a higher or rich community and developers, which helps in the easy hiring of developers and online solutions easily.
It helps in optimizing the resources. It supports the multiplayer option with networking. uses of C++ allows procedural programming for intensive functions of CPU and to provide control over hardware, and this language is very fast because of which it is widely used in developing different games or in gaming engines.
Uses of C++ is referred to as the safest language because of its security and features. It is the first language for any developer to start, who is interested in working in programming languages. It is easy to learn, as it is pure concept-based language. Its syntax is very simple, which makes it easy to write or develop and errors can be easily replicated. Before using any other language, programmers preferred to learn C++ first and then they used other languages. But most of the developers try to stick with C++ only because of its wide variety of usage and compatibility with multiple platforms and software.
Do'stlaringiz bilan baham: |