The article explains that Genshin Impact’s massive AAA game uses Unity with C# for gameplay logic, C++ for the engine core, Go or Java for server back‑ends, Python for tooling, and even assembly for critical performance paths, illustrating why a single language cannot cover all needs.
Genshin Impact combines Unity's C# scripting, C++ engine cores, Go or Java for servers, Python for tooling, and even hand‑written assembly for critical paths, illustrating how a modern AAA game relies on a multi‑language stack to balance performance and development speed.
Genshin Impact combines Unity's C# scripting, C++ engine cores, Go/Java server back‑ends, Python tooling, and even hand‑written assembly to balance performance and development speed across its massive AAA open‑world game.
The CodeTrend daily report for April 26 2026 highlights the most starred GitHub repositories across languages, featuring projects like LadybirdBrowser, TensorFlow, PostHog, Home‑Assistant, and Claude‑Code, and provides today’s, this week’s and this month’s star gains with direct repository links.
Although std::unordered_map has O(1) average complexity and std::map has O(log N), the actual runtime depends on memory layout and cache behavior, so at certain data sizes the tree‑based map can be faster due to fewer cache misses.
This article explains how to use class and object adapters in C++ to reconcile mismatched logging interfaces, allowing seamless integration of third‑party loggers without modifying existing system code, and demonstrates the transition from inheritance‑based adapters to composition‑based adapters for greater flexibility.
A C++ developer faces a mismatched logging API between an internal ILogger interface and a third‑party FastLogger library, and the article walks through class‑adapter inheritance, its limitations, and a more flexible object‑adapter composition solution that enables runtime switching across multiple logger implementations.
This article provides a comprehensive guide to the const and static modifiers in C/C++, covering their distinct purposes, usage with variables, pointers, functions, and class members, and answering common interview questions with clear explanations and practical code examples.
This step‑by‑step tutorial shows how to configure gRPC, define protobuf service contracts, and implement streaming upload and download in C++, covering environment setup, code generation, server and client logic, testing, and performance tuning for efficient file transfer.
A C++ service that crashes after a harmless log module addition is traced back to undefined cross‑file global initialization order, revealing the static initialization order fiasco and how linking order and compiler‑generated init arrays can cause runtime failures.
This article explains the LeetCode 1297 problem of finding the substring that appears most often while respecting limits on distinct characters and length, and provides a detailed sliding‑window analysis together with complete Java and C++ reference implementations.
A six‑line C++ lambda caused a $2.3 million loss due to a dangling reference, and after months of debugging the team rewrote the order‑matching engine in Rust, cutting latency by 19 % and eliminating the hidden ‘safety tax’ of memory‑unsafe code.
The article presents LeetCode problem 2609, defining a balanced substring as a consecutive segment of zeros followed by an equal number of ones, and provides a linear‑time solution using a two‑pointer scan that counts consecutive zeros and ones, with implementations in Java, C++, Python, and TypeScript, along with complexity analysis.
This article explains how to determine whether a given unsigned integer belongs to a set of 4 billion distinct numbers within a 1 GB memory limit, comparing a bitmap approach with a Bloom filter, providing detailed implementation steps and C++ code examples for both methods.
This article explains why C++ thread pools often hit bottlenecks in high‑concurrency scenarios and provides practical techniques—such as lock‑granularity tuning, lock‑free queues, object‑pool reuse, and pre‑allocation—to improve task scheduling and memory management without relying on external frameworks.
This article explains the natural alignment requirements of C/C++ data types, how structs are padded and aligned based on member alignments, the hardware, cache and compiler reasons for alignment, and the concept of over‑aligned types with practical examples and usage guidelines.
This article explains why static code analysis is crucial for C/C++ development, outlines major standards such as MISRA, CWE and CERT, reviews both commercial and open‑source analysis tools, and provides guidance on selecting the right solution based on project needs, budget and integration requirements.
This article explains what callback functions are, how they enable asynchronous programming across languages, demonstrates their implementation with JavaScript, C/C++, Python and HTML examples, and discusses practical use‑cases, advantages, pitfalls like callback hell, and modern alternatives such as Promises and async/await.
This article explains what memory leaks are in C++ on Linux, why they matter, how they occur, and provides practical guidance on detecting them with tools like Valgrind, AddressSanitizer, GDB, and mtrace, followed by concrete solutions such as proper new/delete usage, smart pointers, RAII, custom allocators, and memory pools.
This article traces the evolution of C++ template constraints—from the cryptic SFINAE and enable_if techniques, through the clearer constexpr if introduced in C++17, to the expressive and user‑friendly Concepts of C++20—showing how each step makes generic programming more readable and maintainable.
Workflow, Sogou’s open‑source C++ asynchronous framework, tackles the core challenge of efficiently processing massive delayed tasks in distributed systems by integrating a time‑wheel based scheduler, non‑blocking I/O, and lightweight APIs, delivering millisecond‑level precision and dramatically reduced resource consumption.
This article presents twelve practical guidelines—ranging from layered design and adapter patterns to careful handling of standard functions and platform quirks—that help embedded developers write C/C++ code that can be reliably moved across different hardware and operating systems.
Google’s ambitious eight‑year roadmap for the experimental Carbon language aims to create a modern, safer, C++‑compatible system language, detailing its tooling, ecosystem, migration strategy via FFI, and why it’s preferred over Rust despite the long development horizon.
Lock‑free queues replace costly mutexes with atomic operations, eliminating lock contention, deadlocks, and scalability limits, and this article explains their principles, classic implementations, C++ code examples, performance testing, and real‑world applications such as game engines and high‑throughput servers.
This article reveals ten common C++ performance pitfalls—from costly abstractions and virtual functions to hidden copies, destructors, and misuse of smart pointers—while also showcasing practical language features and optimization techniques that can dramatically improve runtime efficiency in production code.
This article provides a comprehensive guide to C++ debugging, covering the installation, core commands, and practical examples of GDB and Valgrind, along with advanced techniques, common pitfalls, and best‑practice recommendations to help developers efficiently locate and fix memory and segmentation errors.
This article explains C++ compiler optimization levels, compares -O2 and -O3, provides practical usage examples and best‑practice guidelines, and demonstrates performance gains with benchmark code, helping developers choose the right optimization flag for development and release builds.
The article explains the common misconception that address 0 is always illegal, clarifies why operating systems reserve it, and shows how bare‑metal and embedded development can freely use address 0 with concrete assembly examples and C/C++ representations.
This article examines whether the C/C++ entry‑point function main can call itself recursively, outlines the relevant language standards, shows compiler support and example code, discusses practical limitations such as stack size and portability, and recommends safer programming patterns.
This article explains why C/C++ function and global variable addresses are fixed at link time, how modern operating systems provide each process with a private virtual address space, the role of ABI and linker scripts in defining segment layout, and how the loader later maps those virtual addresses to physical memory.
This article explains the versatile static keyword in C++ by covering six practical patterns—including local static variables, file‑scope static globals, static class members, static member functions, lazy‑initialized singletons, and compile‑time constants—complete with clear code examples and usage tips.
This article explains the differences between C++ function templates and class templates, shows when each should be chosen, provides clear code examples for both, and offers practical tips, advanced techniques, and a decision guide to help developers select the right template for their tasks.
This article explains what C++11 condition variables are, why they are essential for efficient multithreading, shows their basic usage with std::condition_variable and std::mutex, walks through a producer‑consumer example, demonstrates a thread‑pool implementation, and lists crucial best‑practice tips.
This guide outlines thirty‑two practical C/C++ coding habits—from proper file headers, indentation, and commenting to error handling, const usage, and avoiding macros pitfalls—aimed at improving code readability, maintainability, and reliability for developers of all levels.
This article explains the differences between C++ const and constexpr, using a kettle analogy, detailed code examples, and practical guidelines to help developers choose the right keyword for compile‑time or runtime constants, improve performance, and write safer code.
Learn what const means in C++, how to declare constants, use const with pointers, functions, and member methods, understand constexpr, and follow best practices to improve code safety, readability, and compiler optimization.
This guide explains what variables are in C++, covers declaration and initialization, details fundamental data types such as int, float, double, char, and bool, outlines naming conventions, and demonstrates both implicit and explicit type conversions with clear code examples.
This article explains how using mmap for shared memory in C/C++ can break process isolation, introduce permission‑related code‑injection vulnerabilities, and cause multithreading synchronization issues, making it a riskier choice than the traditional malloc allocation.
From powering cutting‑edge 3A games and operating system kernels to accelerating scientific simulations, high‑frequency trading, and embedded IoT devices, C++ remains the go‑to language for high‑performance, low‑level control across diverse domains, thanks to its speed, portability, and fine‑grained memory management.
This guide explains why deadlocks occur in Linux C++ multithreaded programs, demonstrates how to reproduce them with sample code, and shows step‑by‑step how to use shell commands and GDB to identify and resolve the deadlock, ensuring stable and efficient execution.
This article explains how C++11’s nullptr, override, and final keywords eliminate common bugs, improve code clarity, and enforce design intent, providing practical examples and step‑by‑step guidance for safer, more maintainable C++ code.
This comprehensive guide explores how coroutines provide a lightweight, lock‑free alternative to traditional threads for high‑concurrency C/C++ server programming, covering their fundamentals, differences from threads, implementation techniques, context switching, scheduler design, epoll integration, timer management, and performance testing.
This article presents a comprehensive, difficulty‑ordered list of 60 small Linux C/C++ projects—ranging from basic command‑line tools to advanced system‑level components—designed to help developers practice core programming concepts, system programming, networking, concurrency, and performance optimization.
Analyzing the June 2025 TIOBE ranking, the article reveals Python’s surge to the top, examines the steady yet declining position of Java, and explains why C++ and C remain vital, highlighting AI’s impact, language ecosystem strengths, and the broader implications for developers.
The June 2025 TIOBE index shows Python reclaiming the top spot with a 10.5% surge, while Java falls to fourth, prompting analysis of AI-driven growth for Python, the enduring relevance of C/C++ in systems and game development, and the stable enterprise value of Java.
This article clarifies whether a C++ vector object resides on the stack, heap, or in static storage, explains that its elements are almost always allocated on the heap, covers special cases like small‑vector optimization, and provides interview‑ready answers with sample code and memory‑location experiments.
Choosing the right programming language depends on project requirements such as performance, development speed, platform compatibility, and team expertise, with C++ excelling in low‑level control, Java dominating enterprise back‑ends, Python leading in AI and rapid development, and C# powering Windows and Unity game applications.
This article explains C++ move semantics, covering the concepts of lvalues and rvalues, the syntax and rules of rvalue references, how std::move converts lvalues to rvalues, and demonstrates practical applications such as custom class move constructors, STL container optimizations, and return value optimization.
The article shares detailed WeChat (wxg) interview experiences from Java and C++ candidates, highlighting the high difficulty, the blend of algorithmic depth and system design breadth, and the extensive range of technical questions that ultimately led both candidates to fail.
This article explains what deadlocks are in C++ multithreaded programming, outlines their causes and four necessary conditions, presents common scenarios and code examples, and offers practical strategies such as consistent lock ordering, std::lock, std::scoped_lock, recursive mutexes, and lock hierarchies to avoid them.
The article first highlights Tencent's Q1 2025 financial results and user metrics, then introduces the LeetCode 2013 'Detect Squares' problem, describing its requirements, example, and offering Java, C++, Python, and array‑based solutions along with time and space complexity analysis.
This article explains how C++ implements runtime polymorphism through virtual function tables, detailing their structure, memory placement, how they enable dynamic binding, and illustrating usage with single, multiple inheritance and practical code examples.
The article first discusses how many large companies now filter candidates by strict academic degree requirements, then presents LeetCode problem 407 (Trapping Rain Water II) and provides a detailed Dijkstra‑variant solution using a min‑heap, including full Java and C++ implementations and complexity analysis.
Discover the true nature of C++ references—from intuitive aliases and their advantages over pointers, to underlying implementation, right‑value and forwarding references, practical use‑cases, common pitfalls, and modern best practices—empowering you to write safer, cleaner, and more efficient C++ code.
This article explains LeetCode problem 1546, which requires finding the maximum number of non‑empty, non‑overlapping subarrays whose sums equal a given target, discusses why a sliding‑window fails, and provides a prefix‑sum map solution with full Java and C++ implementations.
Serialization in C++ bridges in‑memory objects and persistent or network formats, addressing challenges like byte order, data type compatibility, and complex structures, while the article reviews core principles, binary and text formats, major libraries such as Protobuf, Cereal, Cista++, ThorsSerializer, and offers guidance on selecting and using them effectively.
This article provides a concise overview of the most commonly used new features introduced in C++11 through C++20, including auto type deduction, range‑based for loops, smart pointers, lambda expressions, move semantics, structured bindings, concepts, ranges, coroutines, the spaceship operator, and more, with clear code examples.
This article explains the problems of memory fragmentation and allocation inefficiency in C++ programs, introduces the concept of memory pools, discusses their design principles, advantages, and common implementations, and provides a complete example of a thread‑safe fixed‑size memory pool with code.
This article traces the evolution of memory layout from early punched‑card computers through assembly‑level innovations, segment‑based designs, and virtual memory, then demonstrates a real 32‑bit Linux C++ program showing where globals, stack, heap, and mapped regions reside, and explains how this knowledge helps debug segmentation faults, stack overflows, and memory leaks.
This article introduces LeetCode problem 1448 about counting good nodes in a binary tree, explains the definition of a good node, provides example inputs and outputs, outlines constraints, offers a detailed DFS analysis, and presents complete Java and C++ implementations.
Given an integer array, the task is to find the maximum sum of a non‑empty subarray after optionally deleting at most one element, which can be solved via dynamic programming using two states to track sums with and without a deletion, as demonstrated with Java and C++ implementations.
This guide explains why including the same header file multiple times causes redefinition errors in C/C++ and demonstrates two common techniques—using #ifndef guards and the #pragma once directive—to ensure each header is processed only once.
The article examines the intense debate over C++'s future, highlighting government warnings, industry shifts toward Rust, the C++ standards committee’s focus on ABI stability, and the clash between modern‑tool‑driven teams and legacy‑code enterprises, questioning whether the language can stay relevant.
This article explains LeetCode problem 1186, which asks for the maximum sum of a contiguous subarray after optionally deleting one element, and presents a dynamic‑programming solution with recurrence formulas, base cases, and full Java and C++ implementations.
This article provides an in-depth tutorial on the GNU Debugger (GDB), covering its purpose, installation, basic and advanced commands, remote debugging, memory analysis, and practical tips for efficiently debugging C/C++ applications on Linux and Windows platforms.
Didi replaced its legacy agent with Alibaba’s open‑source iLogTail, re‑architected it to use a shared thread‑pool and SIMD‑accelerated parsing, rewrote critical plugins in C++ and added robust Kafka retry logic, achieving over twice the throughput while cutting CPU usage by more than half and maintaining near‑zero latency at massive scale.
This article details the architectural overhaul of iLogtail into LoongCollector, explains why generalization caused a 15% performance drop, and walks through four systematic optimizations—including memory arenas, eliminating shared_ptr, event pooling, and direct serialization—that ultimately restored and doubled log‑collection throughput.
This article explains the concept of memory pools, how they reduce allocation overhead and fragmentation compared to traditional malloc/new, describes various pool designs and Linux kernel APIs, provides multiple C and C++ implementations, and discusses performance benefits and typical application scenarios such as servers, real‑time and embedded systems.
This step‑by‑step guide shows how to choose a Linux distribution, install GCC, configure Vim/VS Code/CLion, compile and run C/C++ programs, set up debugging with GDB and Valgrind, automate builds with Makefile or CMake, beautify the terminal, and manage code with Git, all with concrete commands and examples.
This guide explains how to use GDB watchpoints to monitor specific memory addresses, detect unexpected modifications caused by bugs such as wild pointers or multithreaded writes, and pinpoint the exact code responsible, illustrated with a C++ example that spawns a thread modifying a variable.
The article recounts how Andy turned a challenging wedding seating arrangement into the PerfectTablePlan software, detailing its development with C++/Qt, use of genetic algorithms and quantum computing, rapid market adoption, extensive marketing tactics, and the eventual creation of a sustainable one‑person business.
This article introduces ten widely used modern C++ features—including range‑based for loops with initializers, structured bindings, inline variables, std::optional, std::variant, std::visit, constexpr if, default/delete functions, [[nodiscard]] and std::string_view—explaining their benefits and providing concise code examples.
This article explains LeetCode problem 77, describing how to generate every possible combination of k numbers from the range 1 to n using backtracking, and provides complete Java, C++, and Python implementations along with a brief analysis and constraints.
Bjarne Stroustrup urges the C++ community and the WG21 standards committee to adopt mandatory guideline configuration files, known as Profiles, to improve type and memory safety, while highlighting recent language features, upcoming C++23 and C++26 enhancements, and the broader evolution of the language.
This article explains the seven default special member functions that C++ automatically provides for a class—including constructors, destructors, copy/move operations and address‑of operators—showing when they are sufficient, when they can cause problems such as shallow copies or double frees, and how to implement custom versions to ensure correct resource management.
This article explains the LeetCode Combination Sum II problem, detailing how to find all unique candidate combinations that sum to a target using sorting and backtracking while eliminating duplicate results, and provides complete implementations in Java, C++, C, and Python.
This article provides an extensive overview of C++ network programming concepts frequently asked in interviews, covering sockets, TCP/UDP differences, I/O multiplexing models, handshake mechanisms, packet framing issues, concurrency strategies, code examples for servers and clients, and performance optimization techniques.
This article compiles a wide range of Linux C/C++ interview questions covering language fundamentals, data structures, algorithms, operating systems, networking, databases, and general problem‑solving approaches to help candidates assess and improve their technical knowledge.
This article explains how to set hardware and software watchpoints in GDB to monitor specific memory addresses, demonstrates the technique with a multithreaded C++ example, and describes the underlying CPU debug registers that enable precise detection of reads and writes.
This article explains the LeetCode 75 "Sort Colors" challenge, detailing the problem statement, constraints, a three‑pointer Dutch National Flag solution, and provides complete implementations in Java, C++, C, and Python without using built‑in sorting functions.
This article explains the C++ static keyword, detailing how static variables extend lifetime across function calls, the differences between static local and global variables, and provides clear code examples illustrating their behavior and proper usage.
This article examines high‑concurrency C++ timer solutions, detailing the principles, advantages, and code examples of three implementations—red‑black tree, min‑heap, and time‑wheel—while comparing their performance, complexity, and suitable application scenarios for server‑side systems.
This guide walks you through installing GCC/G++, compiling single‑ and multi‑file C/C++ programs, using essential compiler options, performing step‑by‑step builds, and leveraging GDB for effective debugging, while also covering common errors and their solutions.
The article explains that the prevalence of programming languages beginning with “C” stems from the historical evolution of BCPL to B to C, after which numerous C‑based derivatives such as C++, C#, Objective‑C, and even unrelated CSS emerged, highlighting C’s foundational role in language design.
This article explains the fundamental differences between stack and heap memory, covering their structures, allocation strategies, performance characteristics, language-specific examples in Java, C++, and Python, and provides guidance on when to use each type for efficient programming.
This article explains how C++ objects are laid out in memory, covering alignment rules, padding, the impact of member order, how to use sizeof and #pragma pack to inspect sizes, and when optimizing layout is worthwhile for performance and memory efficiency.
This article explains why C++ timers are essential for asynchronous programming, presents three implementation approaches—including a simple thread‑chrono version, a Boost.Asio based timer, and a C++11 atomic/condition‑variable design—offers practical optimization tips such as precise intervals, thread‑pool reuse, efficient callbacks, and memory management, and demonstrates their impact with a network‑server case study comparing naïve and optimized solutions.
The article first shares a personal anecdote about job background checks and then presents a detailed explanation of LeetCode problem 5 – Longest Palindromic Substring – including problem description, dynamic‑programming analysis, recurrence formula, and complete Java and C++ code examples.
The article shares a personal Ctrip referral story, recent campus‑recruitment salary figures, and a comprehensive interview guide covering C++ vs Java differences, memory layout, OS concepts, networking fundamentals, database indexing, and a classic min‑stack algorithm problem.
Fish Shell, the user-friendly command-line shell for Linux and macOS, is undergoing a major rewrite from C++ to Rust, achieving a near‑complete Rust codebase, extensive contributor activity, and performance improvements while addressing legacy toolchain challenges and enhancing modern functionality.
This article explains the concepts of shallow and deep copying in C++, demonstrates their pitfalls such as shared memory and double deletion, and shows how to implement proper copy constructors, assignment operators, and move semantics following the Rule of Three/Five to ensure safe and efficient resource management.
This article explains the C++ this pointer, covering its role as a constant pointer to the current object, how it accesses members, resolves name conflicts, enables method chaining, and the way the compiler passes it implicitly, while also noting its limitations in static and global contexts.
This article examines whether std::cout is thread‑safe, explains the concepts of data race and race condition, demonstrates how interleaved output can occur in multithreaded C++ programs, and presents several solutions—including mutexes, custom wrappers, and C++20 std::osyncstream—to ensure orderly output.
The Fish Shell project migrated its entire codebase from C++ to Rust over two years, detailing the motivations, challenges, mistakes, and benefits of the transition, and outlining the future work still pending for this open‑source shell.
This article explains the problems of frequent new/delete in C++, introduces memory‑pool concepts, details design principles, outlines a multi‑layer architecture (Thread Cache, Central Cache, Page Cache), provides a complete C++ implementation compatible with std::allocator, and discusses common pitfalls and performance considerations.
This article provides an in‑depth overview of Valgrind, explaining its architecture, the capabilities of its various tools such as Memcheck, Cachegrind, Callgrind, Helgrind and Massif, and offers step‑by‑step installation, configuration, and practical code examples for detecting memory errors, leaks, and performance bottlenecks in C/C++ programs.
ByteDance's STE team dissected the severe compile‑time delays and oversized binary artifacts in their data‑center C++ applications, presenting root‑cause analyses, LLVM bug fixes, and a suite of optimization techniques that together cut build times by up to 50% and reduced binary size by over 80%.
This article explains how C++ smart pointers—unique_ptr, shared_ptr, weak_ptr and the deprecated auto_ptr—use RAII and reference‑counting to automate memory management, avoid leaks and dangling pointers, and provide guidelines, performance analysis, and practical usage tips for modern C++ development.
This article explains C++11’s memory model and atomic types, demonstrating how lock‑free concurrency, memory ordering, and synchronization primitives such as fences can be used to achieve high‑performance, race‑free multithreaded code for demanding backend systems like game servers.