Chapter 23: The Full Moon Yet Unfulfilled, Code Hard to Untangle Emotions

Chapter 23: The Full Moon Yet Unfulfilled, Code Hard to Untangle Emotions The full moon yet unfulfilled, code hard to untangle emotions.One ring links to another, heavy thoughts difficult to clarify. On the Mid-Autumn night, speaking of hidden feelings, emotions hard to conceal.Code hard to express longing, only true heart is hardest to forget. On … Read more

Armadillo: A Powerful C++ Library

Armadillo is a high-performance C++ linear algebra library that strikes a good balance between usability and speed. Its syntax is designed to be similar to Matlab, making it easy to get started if you are familiar with Matlab. This library supports integers, floating-point numbers, and complex numbers, providing a rich set of linear algebra, matrix … Read more

Interpretation of Google C++ Style Guide Series Part 1 (Header Files)

This series of articles is an interpretation of the original text, adding some personal insights and supplementing actual code examples to aid understanding – Original text link C++ Version The target version of this Google C++ style guide is C++20, so it will not cover features of C++23. Header Files Typically, each <span>.cc</span> file should … Read more

The cout and Its Intelligent Output Mechanism in C++

New Features of cout In C++, cout is a powerful output tool that can intelligently handle different types of data and automatically perform appropriate conversions. This intelligent behavior stems from C++’s object-oriented features and operator overloading. Basic Usage of cout Printing Strings #include <iostream> using namespace std; int main() { cout << "Hello, World!"; // … Read more

Analysis of C++ Level 1 T1 Mathematics and Programming Application Problems for the National Unified Examination on September 27, 2025

Store Discounts Problem Description The store is running a promotional event, offering two discount options. The first option is to reduce the price by y yuan when spending at least x yuan; the second option is a direct discount of n percent, meaning the price becomes n/10 of the original. Here, x, y, and n … Read more

C++ Composite Types (References and Pointers)

Composite types refer to types defined based on other types.Simple variable definition: data type +declarator (variable name)ReferenceReference: gives another name to an object, and the reference type refers to another type.References are defined by writing the declarator in the form of &d, where d is the name of the declared variable. int ival=1024;int &refVal = … Read more

C++ Programming Tips: Resource Leaks Caused by Constructor Exceptions

If an exception occurs in the constructor of a class, the constructed object will be incomplete, indicating a construction failure. This incomplete object can lead to resource leaks.Assuming we use a “People” class to represent a human, this class should include name, age, facial data, and fingerprint data. We typically write it like this: // … Read more

C++ Conditional and Loop Control: while Loop

Loop Syntax A loop repeatedly executes a set of statements until a specific condition is met. In C++, the while loop: as long as the condition is true, the while loop will repeatedly execute a set of statements until a certain specific condition is satisfied. Syntax: while (condition) { // Loop body, statements to be … Read more

Jolt Physics: A Powerful C++ Library for High-Performance Game and VR Physics

🎮 Jolt Physics 5.2.0: A High-Performance C++ Physics Engine for Modern Games and VR In game development, virtual reality (VR), and simulation systems, the physics engine is a core component that makes the virtual world come to life. It is responsible for handling: Rigid body motion (e.g., falling boxes, vehicle collisions) Collision detection (whether two … Read more

libnpy: Easily Read and Write NumPy Data Files with C++

📊 libnpy: Easily Read and Write NumPy Data Files with C++ Have you encountered the following scenarios while developing C++ projects? “How do I load model weights trained with NumPy in Python into C++?”“How can a C++ program read sensor data in .npy format?”“Is there a simple way to share array data between C++ and … Read more