Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the document structure of C++?

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces "how the C++ document structure is". In the daily operation, I believe many people have doubts about the C++ document structure. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubts about "how the C++ document structure is". Next, please follow the editor to study!

The structure of this document

Each rule (guide, recommendation) contains several sections:

The rule itself-for example, avoid using the new operator directly

The reference number of the rule-for example, C.7 (the seventh rule related to the class). Since there is no natural sorting for the main partition, we use letters as the first part of the rule reference number. We leave a gap between numbers in order to minimize the impact of adding or deleting rules.

Reason (according to)-it is difficult for programmers to follow rules without understanding them.

Examples-abstract rules are not easy to understand; examples can be positive or negative.

Optional-applies to rules such as "Don't do sth."

Exceptions-we provide simple and universal rules. Although many rules can be widely applied, they do not apply to any situation, so exceptions must be listed.

Implementation recommendations-recommendations on how rules can be "mechanized" checked.

Note (comments)-content that cannot be classified into other categories but needs to be elaborated.

Discussion-basis and / or examples for further expansion placed outside the list of main rules.

Some rules are difficult to mechanize, but they all meet one standard: expert programmers can easily identify violations of them. We hope that "mechanized" tools will be as close as possible to the level of expert programmers over time. At the same time, we also believe that: with the passage of time, the rules will continue to be improved and become more accurate and inspectable.

The rules will be as simple as possible, rather than carefully deliberated to take care of all possible and special situations. Such information is described in optional paragraphs and discussion areas. If you don't understand a rule or object to it, please refer to the discussion section.

This is not a language manual. It's useful, of course, but it's not all-inclusive, it doesn't guarantee that all the technical details are correct, and it's not a guide to existing code. The recommended sources of information can be found in the Resources section.

In.sec: Major sections (primary partition)

In: Introduction (introduction)

P: Philosophy (basic principles)

I: Interfaces (interface)

F: Functions (function)

C: Classes and class hierarchies (classes and inheritance)

Enum: Enumerations (enumeration)

R: Resource management (Resource Management)

ES: Expressions and statements (expressions and statements)

Per: Performance (performance)

CP: Concurrency and parallelism (concurrency and similarity)

E: Error handling (error handling)

Con: Constants and immutability (constant and invariant)

T: Templates and generic programming (templates and generic programming)

CPL: C-style programming (C style programming)

SF: Source files (source code)

SL: The Standard Library (standard library)

Supporting sections:

A: Architectural ideas (structural thinking)

NR: Non-Rules and myths (pseudo rules and rumors)

RF: References (Resources)

Pro: Profiles (side of the rule)

GSL: Guidelines support library (Guide support Library)

NL: Naming and layout rules (naming and layout rules)

FAQ: Answers to frequently asked questions (frequently asked questions)

Appendix A: Libraries (Library)

Appendix B: Modernizing code (modernization code)

Appendix C: Discussion (discussion)

Appendix D: Supporting tools (support tool)

Glossary (glossary)

To-do: Unclassified proto-rules (unfinished items: prototype of unclassified rules)

There is no orthogonal relationship between partitions.

Translator's note: there may be repetition.

Each partition (for example: P for basic principles) and each sub-partition (for example, C.hier stands for class hierarchical relationships in object-oriented programming (OOP)) has an acronym for retrieval and reference. The acronym of the primary partition is also used for regular coding (for example, "C11" stands for "make the representation type regular")

At this point, the study of "what is the document structure of C++" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report