Based on the author’s years of industry experience and C++ project best practices, the following coding standards have been compiled
This article aims to be as well-reasoned and evidence-based as possible, and may be revised from time to time.
Last revised: 2026-01-06
Unless there are special circumstances, the following coding standards should be followed to prevent unexpected problems.
This article will list as many situations as possible encountered during programming, along with the problems solved by adopting these coding standards. The goal is to ensure that different programmers arrive at a single, unique coding format when facing the same requirement. If a certain behavior is not explicitly mentioned in this text, it can be regarded as undefined behavior, and you may judge whether it conforms to the standard based on your own practice.
This article may use the following tags to indicate how strictly a rule is enforced: 说明提议推荐强制
For Unreal Engine, see: UE Project Client Coding Style Guide
Programming Approach
推荐If it conflicts with certain project frameworks (UE4, Boost, etc.), the framework’s own rules should generally take precedence.
推荐If the framework already provides an equivalent interface, prefer the framework-provided interface unless strict consistency is required.
Naming Conventions
强制Folder names are uppercase; file names are lowercase with multiple words joined by _.
强制Variables are named in lowercase, member variables are suffixed with _, and function parameters may be prefixed with _.
强制Class names are uppercase.
强制Function names are uppercase.