Tagged articles

C++

890 articles · Page 2 of 9
Deepin Linux
Deepin Linux
Dec 28, 2025 · Fundamentals

Understanding Linux User Stacks: How Threads Manage Memory and Calls

This article explains the role of the Linux user stack in multithreaded programs, covering its memory layout, how each thread gets a private stack, stack frame mechanics, growth and overflow handling, and practical examples of creating and debugging stacks with pthreads and gdb.

C++LinuxStack Overflow
0 likes · 24 min read
Understanding Linux User Stacks: How Threads Manage Memory and Calls
Java One
Java One
Dec 26, 2025 · Fundamentals

How C/C++, Java, and Python Run: A Deep Dive into Compilation and Execution

This article compares the execution models of C/C++, Java, and Python, explaining how compiled machine code, bytecode with JVM, and interpreted bytecode with the Python virtual machine operate, and illustrates each process with example file structures and compilation steps.

C++CompilationJava
0 likes · 6 min read
How C/C++, Java, and Python Run: A Deep Dive into Compilation and Execution
Deepin Linux
Deepin Linux
Dec 25, 2025 · Operations

How to Optimize Linux Thread Stack Memory for High‑Concurrency Services

This article explains the fundamentals of Linux thread stack memory, identifies why default stack sizes can cause waste or overflow in high‑concurrency scenarios, and provides practical techniques—including stack‑size tuning, code refactoring, and memory‑mapping—to reduce memory usage and improve service stability.

C++LinuxMemory Optimization
0 likes · 34 min read
How to Optimize Linux Thread Stack Memory for High‑Concurrency Services
Liangxu Linux
Liangxu Linux
Dec 24, 2025 · Fundamentals

Mastering C Function Pointers: From Basics to Embedded Applications

This tutorial explains what function pointers are, how to declare and use them in C, and demonstrates practical embedded‑system patterns such as callbacks, state machines, command dispatch, and advanced techniques like pointer arrays and struct members, while highlighting common pitfalls.

C++callbackscommand dispatch
0 likes · 13 min read
Mastering C Function Pointers: From Basics to Embedded Applications
Liangxu Linux
Liangxu Linux
Dec 23, 2025 · Fundamentals

Why char s1[] and char *s2 Aren’t the Same: Deep Dive into C Arrays vs Pointers

This article explains the fundamental differences between C arrays and pointers by examining memory layout, mutability, sizeof behavior, function parameter handling, multidimensional arrays, and practical best‑practice guidelines, providing clear code examples that reveal why declarations like char s1[] = "liangxu" and char *s2 = "liangxu" behave differently.

C++best practicesembedded C
0 likes · 14 min read
Why char s1[] and char *s2 Aren’t the Same: Deep Dive into C Arrays vs Pointers
Liangxu Linux
Liangxu Linux
Nov 30, 2025 · Fundamentals

How MuditaOS Brings Service‑Oriented Architecture to Embedded Phones

This article introduces MuditaOS, an open‑source embedded operating system for the minimalist Mudita Pure phone, detailing its FreeRTOS‑based service architecture, type‑safe message passing, lifecycle management, and the technical stack that enables a low‑power, E‑Ink‑optimized mobile experience.

C++FreeRTOSMuditaOS
0 likes · 5 min read
How MuditaOS Brings Service‑Oriented Architecture to Embedded Phones
Deepin Linux
Deepin Linux
Nov 30, 2025 · Fundamentals

When Does C++ Generate a Default Copy Constructor? A Deep Dive

This article explains the role of copy constructors in C++, when the compiler automatically provides a default one, the situations that trigger copy construction, why bitwise copying can be unsafe, and how to implement proper deep‑copy semantics with clear code examples.

C++Deep CopyDefault Constructor
0 likes · 31 min read
When Does C++ Generate a Default Copy Constructor? A Deep Dive
21CTO
21CTO
Nov 29, 2025 · Fundamentals

Why GCC’s Switch to C++20 Matters for Every C++ Developer

GCC has officially made C++20 the default language standard, a shift that reshapes codebases, tooling, and developer habits, requiring both newcomers and seasoned programmers to adapt to new features like modules, concepts, and coroutines while managing potential build issues.

C++C++20GCC
0 likes · 5 min read
Why GCC’s Switch to C++20 Matters for Every C++ Developer
Liangxu Linux
Liangxu Linux
Nov 24, 2025 · Fundamentals

Understanding Struct Alignment and Over‑Aligned Types in C/C++

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.

C++C++Struct
0 likes · 11 min read
Understanding Struct Alignment and Over‑Aligned Types in C/C++
IT Services Circle
IT Services Circle
Nov 16, 2025 · Fundamentals

Will C# Overtake Java in 2025? Deep Dive into the TIOBE Index

The November 2025 TIOBE ranking shows Python still on top, but C# is rapidly gaining ground and may surpass Java for the first time in history, driven by cross‑platform .NET, open‑source momentum, modern language features, and strong backing from Microsoft and the cloud ecosystem.

2025C++Java
0 likes · 7 min read
Will C# Overtake Java in 2025? Deep Dive into the TIOBE Index
Liangxu Linux
Liangxu Linux
Nov 16, 2025 · Fundamentals

Convert Serial Bytes to Float in Embedded C with Unions and Endianness

This article explains how to reconstruct a 32‑bit floating‑point value from four serial bytes in embedded C by using a union or struct overlay, demonstrates the code, shows the resulting little‑endian byte order, and provides a simple function to detect system endianness.

C++Serial CommunicationUNION
0 likes · 5 min read
Convert Serial Bytes to Float in Embedded C with Unions and Endianness
Liangxu Linux
Liangxu Linux
Nov 13, 2025 · Fundamentals

How to Define a Custom read() in C Without Hiding the System Call

This article explains how to create a user‑defined read() function in C that coexists with the standard library read() by using the static keyword and separate translation units, providing code examples, compilation steps, and execution results.

C++Linuxfunction-overriding
0 likes · 6 min read
How to Define a Custom read() in C Without Hiding the System Call
Liangxu Linux
Liangxu Linux
Nov 12, 2025 · Fundamentals

Mastering Button Management in Embedded C with lwbtn: A Deep Dive

This article introduces the lightweight lwbtn library for embedded C, explains its core features, shows how to integrate it on STM32 with a complete demo, and provides an in‑depth analysis of its architecture, state‑machine processing, click detection algorithm, configuration options, and practical usage tips.

C++GPIOSTM32
0 likes · 13 min read
Mastering Button Management in Embedded C with lwbtn: A Deep Dive
Huawei Cloud Developer Alliance
Huawei Cloud Developer Alliance
Nov 5, 2025 · Fundamentals

Why static_cast Beats C‑Style Casts in Modern C++

This article explains how static_cast provides compile‑time type safety, clearer intent, and zero runtime overhead compared to C‑style casts, covering basic arithmetic, pointer, and enum conversions, the compiler’s processing steps, practical examples, and best‑practice recommendations for safe C++ coding.

C++best practicescompile-time safety
0 likes · 14 min read
Why static_cast Beats C‑Style Casts in Modern C++
Liangxu Linux
Liangxu Linux
Nov 4, 2025 · Fundamentals

Top Open‑Source MCU Libraries and Projects for Embedded Development

This article curates a collection of popular open‑source microcontroller projects, covering practical software modules such as MultiButton, QueueForMcu, and StateMachine, complete hardware projects like TinyGameEngine and HomeAutomation, IoT platforms, creative gadgets, and debugging tools, each with repository links, feature highlights, usage examples, and code snippets.

C++HardwareIoT
0 likes · 13 min read
Top Open‑Source MCU Libraries and Projects for Embedded Development
Liangxu Linux
Liangxu Linux
Oct 30, 2025 · Fundamentals

Boost Embedded Performance with the Lightweight C Event Library lwevt

This article introduces lwevt, a lightweight C event‑management library for embedded systems, covering its design goals, key features, X‑Macro‑based type definitions, thread‑safety considerations, and step‑by‑step usage examples with full source code snippets.

C++X-Macroevent-driven
0 likes · 6 min read
Boost Embedded Performance with the Lightweight C Event Library lwevt
Liangxu Linux
Liangxu Linux
Oct 28, 2025 · Fundamentals

8 Must‑Know Embedded Interview Questions and How to Ace Them

This article presents eight high‑frequency embedded‑system interview questions, explains the underlying concepts such as boot process, interrupt handling, stack overflow detection, struct alignment, bit‑banding, dynamic memory risks, volatile usage, and provides concise C code examples and best‑practice answers to help candidates succeed in technical interviews.

C++Cortex-Membedded
0 likes · 8 min read
8 Must‑Know Embedded Interview Questions and How to Ace Them
Dunmao Tech Hub
Dunmao Tech Hub
Oct 21, 2025 · Backend Development

How to Compile and Deploy ZLMediaKit for GB28181 Video Services

This guide walks you through installing prerequisites, cloning the ZLMediaKit source, compiling it on Linux, configuring it to work with WVP, and launching the server, plus troubleshooting tips and a Docker deployment alternative for GB28181 video integration.

C++GB28181Linux
0 likes · 7 min read
How to Compile and Deploy ZLMediaKit for GB28181 Video Services
Huawei Cloud Developer Alliance
Huawei Cloud Developer Alliance
Oct 20, 2025 · Fundamentals

Why Does a C++ Program Crash on free() Even When It Looks Correct?

Even when a C++ program appears to run correctly, writing beyond allocated memory can corrupt heap metadata, causing a delayed crash at free(); this article explains the underlying malloc/free mechanisms, demonstrates the issue with code examples, and offers debugging tools and defensive programming practices to prevent such errors.

C++Heapdebugging
0 likes · 9 min read
Why Does a C++ Program Crash on free() Even When It Looks Correct?
Liangxu Linux
Liangxu Linux
Oct 18, 2025 · Fundamentals

Essential C Coding Style Guide: Rules for Clean, Consistent Code

This guide outlines comprehensive C coding style rules, covering indentation, naming conventions, whitespace, comments, function prototypes, variable declarations, structures, enums, control flow, macros, and documentation, with clear examples to help developers write clean, maintainable, and consistent code across projects.

C++DocumentationStyle Guide
0 likes · 23 min read
Essential C Coding Style Guide: Rules for Clean, Consistent Code
Liangxu Linux
Liangxu Linux
Oct 15, 2025 · Fundamentals

Unlock Cross‑Platform C Development with TBOX: A Comprehensive Library Overview

TBOX is an open‑source C library offering a unified, cross‑platform API that simplifies common development tasks across Windows, macOS, Linux, Android, iOS and BSD, featuring modules for streams, coroutines, memory, containers, algorithms, networking, databases, and more, with build instructions via xmake.

C++Librarycross-platform
0 likes · 12 min read
Unlock Cross‑Platform C Development with TBOX: A Comprehensive Library Overview
IT Services Circle
IT Services Circle
Oct 15, 2025 · Fundamentals

Why Python Dominates and C Struggles for 2nd Place in the 2025 TIOBE Index

The October 2025 TIOBE index shows Python retaining the top spot while C reclaims second place, with C++, Java, and C# fiercely contesting the rankings, highlighting each language’s unique strengths and the shifting popularity driven by new standards, ecosystem growth, and emerging technology demands.

C++Language PopularityPython
0 likes · 6 min read
Why Python Dominates and C Struggles for 2nd Place in the 2025 TIOBE Index
Liangxu Linux
Liangxu Linux
Oct 12, 2025 · Fundamentals

Mastering Strong and Weak Functions in C for Flexible Embedded Design

This article explains the concept of strong and weak functions in C, shows how to declare them with GCC and other compilers, outlines the linker selection rules, and demonstrates practical uses such as library overrides, interrupt handlers, callbacks, test stubs, plugin systems, and related pitfalls.

C++GCCLinker
0 likes · 9 min read
Mastering Strong and Weak Functions in C for Flexible Embedded Design
Liangxu Linux
Liangxu Linux
Oct 8, 2025 · Fundamentals

Master STM32 ADC Sampling and Filtering: From Basics to Advanced Algorithms

This tutorial walks through STM32F103ZET6 ADC fundamentals, explains key parameters, demonstrates how to use the VOFA+ PC tool for data visualization, and provides step‑by‑step implementations of several filtering algorithms—including first‑order complementary, median, arithmetic average, moving average, limit‑average, and Kalman filters—complete with code examples and performance analysis.

ADCC++Filtering
0 likes · 16 min read
Master STM32 ADC Sampling and Filtering: From Basics to Advanced Algorithms
Deepin Linux
Deepin Linux
Oct 6, 2025 · Fundamentals

Mastering Placement New in C++: When and How to Use It Safely

This article explains the concept, syntax, and practical use cases of C++ placement new, compares it with ordinary new, discusses memory‑pool and stack allocations, highlights alignment and lifetime management issues, and provides interview‑style Q&A with code examples.

C++Object Constructioncustom allocator
0 likes · 35 min read
Mastering Placement New in C++: When and How to Use It Safely
Deepin Linux
Deepin Linux
Oct 5, 2025 · Fundamentals

Why Stack Memory Is Faster Than Heap: Deep Dive into Allocation Mechanics

This article explains the fundamental differences between stack and heap memory allocation, covering their mechanisms, performance characteristics, common pitfalls such as overflow and leaks, and practical coding examples in C and C++, helping developers choose the right memory strategy for efficient software design.

C++allocationperformance
0 likes · 63 min read
Why Stack Memory Is Faster Than Heap: Deep Dive into Allocation Mechanics
Deepin Linux
Deepin Linux
Oct 3, 2025 · Fundamentals

When to Use Mutex vs Spinlock: Performance Guide and Best Practices

Choosing the right lock—mutex or spinlock—can dramatically affect program performance; this article explains their underlying waiting mechanisms, compares CPU usage, context‑switch costs, and suitability across multi‑core versus single‑core, high‑contention versus low‑contention scenarios, and provides practical C++ code examples.

C++Mutexperformance
0 likes · 29 min read
When to Use Mutex vs Spinlock: Performance Guide and Best Practices
IT Services Circle
IT Services Circle
Oct 2, 2025 · Backend Development

Cracking Baidu's C++/PHP Interview: Key Questions, Answers, and QuickSort Code

This article examines the diminishing premium of overseas degrees, suggests one‑year master programs for career advancement, and then provides a comprehensive Baidu interview guide covering C++/PHP fundamentals, memory allocation, networking protocols, process vs thread, Redis performance, and a complete quicksort implementation in C++.

C++Redismemory management
0 likes · 13 min read
Cracking Baidu's C++/PHP Interview: Key Questions, Answers, and QuickSort Code
Deepin Linux
Deepin Linux
Oct 1, 2025 · Fundamentals

Why Deque Beats Vector and List: Inside the Double‑Ended Queue’s Magic

This article explains how the C++ deque combines the random‑access speed of a vector with the constant‑time double‑ended insertions of a list by using a segmented storage architecture, detailing its internal map, iterator mechanics, core operations, performance comparisons, practical use cases, and common pitfalls.

C++algorithmdata structure
0 likes · 47 min read
Why Deque Beats Vector and List: Inside the Double‑Ended Queue’s Magic
Liangxu Linux
Liangxu Linux
Sep 27, 2025 · Fundamentals

10 Proven Strategies to Make Embedded C/C++ Code Truly Portable

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.

C++C++embedded
0 likes · 10 min read
10 Proven Strategies to Make Embedded C/C++ Code Truly Portable
Liangxu Linux
Liangxu Linux
Sep 27, 2025 · Fundamentals

Boost C Performance: Proven Tricks to Speed Up Your Code

This article gathers practical C‑language optimization techniques—ranging from integer declarations and branch reduction to loop unrolling and lookup‑table usage—to help developers improve execution speed and reduce memory consumption on resource‑constrained devices.

C++InlineLoop Unrolling
0 likes · 30 min read
Boost C Performance: Proven Tricks to Speed Up Your Code
Deepin Linux
Deepin Linux
Sep 24, 2025 · Fundamentals

Mastering GDB: Essential Techniques for Memory Debugging and Analysis

This comprehensive guide explores GDB as a powerful debugging tool for memory analysis, covering installation, startup methods, core commands, breakpoint strategies, memory inspection, stack tracing, advanced features, remote debugging, and best practices for production environments, complete with practical code examples and step‑by‑step instructions.

C++LinuxMemory Analysis
0 likes · 55 min read
Mastering GDB: Essential Techniques for Memory Debugging and Analysis
Liangxu Linux
Liangxu Linux
Sep 23, 2025 · Fundamentals

15 Hidden C Language Traps Every Developer Must Avoid

Discover the 15 most common C programming pitfalls—from operator precedence and case sensitivity to pointer misuse and multithreading errors—each illustrated with code examples and practical solutions to help you write safer, more reliable C code.

C++best practicescommon pitfalls
0 likes · 13 min read
15 Hidden C Language Traps Every Developer Must Avoid
php Courses
php Courses
Sep 22, 2025 · Fundamentals

Boost C++ Performance: Proven Memory Management Techniques You Must Use

This article explores why efficient memory management is crucial for C++ performance and presents practical strategies—including stack allocation, RAII, smart pointers, custom memory pools, optimal containers, move semantics, and diagnostic tools—to write faster, more robust programs.

C++Performance OptimizationRAII
0 likes · 9 min read
Boost C++ Performance: Proven Memory Management Techniques You Must Use
Deepin Linux
Deepin Linux
Sep 17, 2025 · Fundamentals

Why new/delete Beats malloc/free: A Deep Dive into C/C++ Memory Management

This article explains the core differences between C's malloc/free and C++'s new/delete, covering allocation mechanisms, object construction and destruction, error handling, common pitfalls, and best practices—including smart pointers—to help developers choose the right memory management approach for various programming scenarios.

C++allocationmalloc
0 likes · 32 min read
Why new/delete Beats malloc/free: A Deep Dive into C/C++ Memory Management
php Courses
php Courses
Sep 16, 2025 · Fundamentals

Mastering std::mutex in C++: Prevent Data Races with Simple Examples

Learn why mutexes are essential for safe multithreaded C++ programming, explore the basic std::mutex API, see practical code examples, and discover advanced lock management with std::lock_guard and other mutex types to avoid data races and deadlocks.

C++Mutexconcurrency
0 likes · 9 min read
Mastering std::mutex in C++: Prevent Data Races with Simple Examples
php Courses
php Courses
Sep 15, 2025 · Fundamentals

Mastering std::thread: Create, Manage, and Synchronize C++ Threads

This tutorial explains the fundamentals of C++11 std::thread, covering thread creation with functions and lambdas, the use of join() and detach(), argument passing techniques, and essential best practices for safe and portable multithreaded programming.

C++JOINconcurrency
0 likes · 10 min read
Mastering std::thread: Create, Manage, and Synchronize C++ Threads
Liangxu Linux
Liangxu Linux
Sep 14, 2025 · Fundamentals

Why C’s void* Pointer Is the Secret to Generic Programming

The article explains how C’s strong type system limits flexibility, how the void* pointer serves as a universal type enabling generic programming, with examples like qsort, malloc, memcpy, and pthread_create, while also discussing the trade‑offs such as loss of type safety and readability.

C++Type SafetyVoid
0 likes · 6 min read
Why C’s void* Pointer Is the Secret to Generic Programming
Deepin Linux
Deepin Linux
Sep 13, 2025 · Fundamentals

Why the volatile Keyword Matters in C/C++: The Hidden Hero of Concurrency and Hardware

This article explains the purpose, mechanics, and practical use cases of the C/C++ volatile qualifier, showing how it forces memory accesses, prevents harmful compiler optimizations, and ensures correct behavior in multithreaded, interrupt-driven, and hardware‑interfacing programs while also highlighting its limitations and performance impact.

C++HardwareOptimization
0 likes · 32 min read
Why the volatile Keyword Matters in C/C++: The Hidden Hero of Concurrency and Hardware
php Courses
php Courses
Sep 12, 2025 · Backend Development

Boost Your C++ Apps with RapidJSON and pugixml: A Practical Guide

This article explains why C++ developers should adopt third‑party libraries like RapidJSON for high‑performance JSON handling and pugixml for lightweight XML processing, covering integration steps, core APIs, and detailed code examples for parsing, generating, and traversing data structures.

C++JSONLibrary
0 likes · 10 min read
Boost Your C++ Apps with RapidJSON and pugixml: A Practical Guide
Deepin Linux
Deepin Linux
Sep 11, 2025 · Fundamentals

Mastering C++ Smart Pointers: unique_ptr, shared_ptr, and weak_ptr Explained

This article introduces C++ smart pointers—unique_ptr, shared_ptr, and weak_ptr—explaining their RAII‑based automatic memory management, usage patterns, performance considerations, common pitfalls such as cyclic references, and practical examples including factory patterns and GUI data sharing, while also covering size and custom deleters.

C++memory managementshared_ptr
0 likes · 24 min read
Mastering C++ Smart Pointers: unique_ptr, shared_ptr, and weak_ptr Explained
Deepin Linux
Deepin Linux
Sep 11, 2025 · Fundamentals

Mastering C++ Memory: When to Use new/delete vs malloc/free

This article explains the fundamental differences between C's malloc/free and C++'s new/delete, covering their underlying mechanisms, proper usage patterns, common pitfalls, error‑handling strategies, and best‑practice recommendations such as smart pointers and memory‑pool techniques.

C++mallocmemory management
0 likes · 29 min read
Mastering C++ Memory: When to Use new/delete vs malloc/free
Liangxu Linux
Liangxu Linux
Sep 10, 2025 · Fundamentals

Why Void Pointers Matter in C: Flexibility and Generic Programming

The article explains that the C language’s void* type serves as a universal pointer, detailing its strong versatility, role as a common interface for memory‑management functions, foundation for generic programming, support for object‑oriented patterns, and usage considerations such as required casting, inability to dereference directly, and type‑safety trade‑offs.

C++generic programmingtype casting
0 likes · 7 min read
Why Void Pointers Matter in C: Flexibility and Generic Programming
Deepin Linux
Deepin Linux
Sep 10, 2025 · Fundamentals

Unlocking C++ Polymorphism: How Virtual Tables Enable Runtime Flexibility

This article explains how C++ implements polymorphism through virtual functions and vtables, covering static and dynamic polymorphism, memory layout, multiple inheritance, practical code examples, design‑pattern applications, and the importance of virtual destructors for safe resource cleanup.

C++Design PatternsOOP
0 likes · 35 min read
Unlocking C++ Polymorphism: How Virtual Tables Enable Runtime Flexibility
IT Services Circle
IT Services Circle
Sep 10, 2025 · Fundamentals

How to Solve LeetCode 757: Minimum Set Intersection of Size Two with a Greedy Approach

The article first discusses common interview pitfalls before presenting a detailed greedy solution for LeetCode problem 757—finding the smallest set that intersects each interval in at least two points—complete with problem description, algorithmic reasoning, complexity analysis, and implementations in Java, C++, Python, and TypeScript.

C++JavaLeetCode 757
0 likes · 11 min read
How to Solve LeetCode 757: Minimum Set Intersection of Size Two with a Greedy Approach
php Courses
php Courses
Sep 10, 2025 · Fundamentals

Mastering C++11 Concurrency: std::thread, std::async, and Best Practices

This guide explains why modern C++ programs need concurrency, introduces the core C++11 tools std::thread and std::async, demonstrates basic usage, parameterized threads, lambda expressions, async task handling, synchronization with mutexes, exception safety, parallel data processing, and provides best‑practice tips for efficient and safe multithreaded development.

C++Parallelismstd::async
0 likes · 10 min read
Mastering C++11 Concurrency: std::thread, std::async, and Best Practices
IT Services Circle
IT Services Circle
Sep 8, 2025 · Fundamentals

How to Count Subarrays with Sum K Using Prefix Sum and HashMap

This article first highlights Ctrip's employee benefits, then presents the LeetCode 560 subarray sum problem with detailed explanations and multi-language implementations using prefix sum and hash map, including Java, C++, Python, and TypeScript solutions, and discusses time and space complexities.

C++JavaLeetCode
0 likes · 6 min read
How to Count Subarrays with Sum K Using Prefix Sum and HashMap
php Courses
php Courses
Sep 8, 2025 · Fundamentals

Mastering C++ Move Semantics: From Lvalues to Efficient Resource Transfer

This article explains C++11 move semantics, covering the distinction between lvalues and rvalues, the role of rvalue references, how std::move enables resource stealing, and how to implement move constructors and move assignment operators for high‑performance code.

C++move semanticsresource management
0 likes · 11 min read
Mastering C++ Move Semantics: From Lvalues to Efficient Resource Transfer
Code Wrench
Code Wrench
Sep 6, 2025 · Backend Development

Mastering High-Performance Timers: Heap vs Timing Wheel in Go and C#

This article explains the core principles of timers, compares heap‑based and timing‑wheel algorithms, analyzes Go's built‑in timer implementation versus C#'s approach, and provides practical optimization techniques for high‑concurrency, high‑precision scenarios.

C++GoHeap
0 likes · 10 min read
Mastering High-Performance Timers: Heap vs Timing Wheel in Go and C#
Liangxu Linux
Liangxu Linux
Sep 6, 2025 · Fundamentals

13 Typical C Segmentation Fault Cases Every Programmer Should Know

This guide enumerates thirteen classic C segmentation fault patterns—including null pointer dereference, illegal memory access, stack overflow, buffer overrun, and misuse of dynamic memory—provides concise code examples for each, explains the underlying cause, and offers practical tips to prevent such crashes.

C++memory managementpointers
0 likes · 9 min read
13 Typical C Segmentation Fault Cases Every Programmer Should Know
php Courses
php Courses
Sep 5, 2025 · Fundamentals

Mastering C++ Lambdas: From Basics to Advanced Techniques

This article explains what C++ lambda expressions are, their syntax, capture mechanisms, mutable keyword, return type deduction, generic and template lambdas, and demonstrates practical uses with STL algorithms, event handling, and asynchronous programming, while offering best‑practice guidelines.

Anonymous FunctionsC++C++11
0 likes · 12 min read
Mastering C++ Lambdas: From Basics to Advanced Techniques
php Courses
php Courses
Sep 4, 2025 · Fundamentals

Master C++11 Range-Based For Loops: Syntax, Benefits, and Best Practices

This article explains C++11's range‑based for loop, covering its concise syntax, advantages over traditional loops, how to modify elements with references, supported container types, the compiler's transformation, and practical best‑practice recommendations for safe and efficient iteration.

C++C++11best practices
0 likes · 7 min read
Master C++11 Range-Based For Loops: Syntax, Benefits, and Best Practices
Liangxu Linux
Liangxu Linux
Sep 3, 2025 · Fundamentals

Can main() Recursively Call Itself? Limits, Risks, and Safer Alternatives

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.

C++C++Programming Fundamentals
0 likes · 8 min read
Can main() Recursively Call Itself? Limits, Risks, and Safer Alternatives
Sohu Tech Products
Sohu Tech Products
Sep 3, 2025 · Mobile Development

Hook an Android Native Function to Always Return True with ShadowHook

This guide demonstrates how to locate a target .so library’s base address on Android, compute the offset of a native method, and use the ShadowHook framework to hook the function, replacing its implementation with a stub that always returns true, complete with CMake setup and Java loading steps.

AndroidC++Frida
0 likes · 10 min read
Hook an Android Native Function to Always Return True with ShadowHook
php Courses
php Courses
Sep 3, 2025 · Fundamentals

Mastering C++11’s auto: Rules, Benefits, and Common Pitfalls

This article explores C++11’s auto keyword, detailing its type deduction rules, advantages, typical use cases such as iterator and lambda handling, and highlights common pitfalls and best‑practice guidelines to help developers write clearer, safer, and more efficient code.

C++C++11auto
0 likes · 9 min read
Mastering C++11’s auto: Rules, Benefits, and Common Pitfalls
Liangxu Linux
Liangxu Linux
Sep 2, 2025 · Fundamentals

Master Linux Timers: From alarm() to timerfd – Choose the Right One

This article walks through the evolution of Linux timers—from the simple alarm() function, through setitimer() and POSIX timer APIs, to the modern timerfd interface—explaining their APIs, code examples, advantages, limitations, performance trade‑offs, and practical selection guidance for different projects.

AlarmC++Linux
0 likes · 16 min read
Master Linux Timers: From alarm() to timerfd – Choose the Right One
php Courses
php Courses
Sep 2, 2025 · Fundamentals

Why and How to Create Custom Exceptions in C++ for Robust Error Handling

This article explains why custom exceptions are essential for clear, domain‑specific error reporting in C++, shows step‑by‑step how to define them by inheriting from standard exception classes, provides practical code examples, and outlines best practices for designing maintainable exception hierarchies.

C++best practicescustom-exception
0 likes · 8 min read
Why and How to Create Custom Exceptions in C++ for Robust Error Handling
Liangxu Linux
Liangxu Linux
Sep 1, 2025 · Fundamentals

What Happens Inside Linux When You Call fork()? A Deep Dive

This article explains how the fork() system call creates a duplicate process in Linux, walks through a simple code experiment, details the kernel steps—including task_struct creation, PID allocation, copy-on-write memory handling, and resource inheritance—and highlights common use cases, optimizations, and pitfalls.

C++Copy-on-WriteLinux
0 likes · 12 min read
What Happens Inside Linux When You Call fork()? A Deep Dive
php Courses
php Courses
Sep 1, 2025 · Fundamentals

Mastering C++ Standard Exceptions: From Basics to Custom Errors

This article explains why using C++ standard exception classes is essential, outlines the exception hierarchy, details common logical and runtime error types, demonstrates throwing and catching exceptions with code examples, and shows how to create custom exception classes for robust error handling.

C++error handlingexception handling
0 likes · 11 min read
Mastering C++ Standard Exceptions: From Basics to Custom Errors
Java Tech Enthusiast
Java Tech Enthusiast
Aug 29, 2025 · Backend Development

Xiaohongshu Autumn 2024 Tech Interview Guide: Salary, Questions & Tips

This article outlines Xiaohongshu's 2024 autumn recruitment details, salary ranges for different offer tiers, work‑schedule changes, and provides in‑depth answers to common backend interview questions covering Redis performance, HTTP vs RPC, virtual memory layout, Go's GMP model, coroutine advantages, C++ class size, diamond inheritance, static variables, core‑dump analysis, and a median‑finding algorithm challenge.

BackendC++Go
0 likes · 19 min read
Xiaohongshu Autumn 2024 Tech Interview Guide: Salary, Questions & Tips
php Courses
php Courses
Aug 29, 2025 · Fundamentals

Mastering C++ Exception Handling: Throw, Try, and Catch Explained

Learn how C++ exception handling separates error management from normal logic using the throw, try, and catch keywords, covering best practices, stack unwinding, performance considerations, and comprehensive code examples that demonstrate throwing standard exceptions, catching specific types, and handling unknown errors.

C++Throwcatch
0 likes · 8 min read
Mastering C++ Exception Handling: Throw, Try, and Catch Explained
Deepin Linux
Deepin Linux
Aug 29, 2025 · Fundamentals

Master VSCode for C/C++ on Linux: Step‑by‑Step Compilation & Debugging Guide

This article walks you through setting up a powerful C/C++ development environment on Linux using VSCode, covering toolchain installation, essential extensions, project initialization, key configuration files, large‑project tips, and a hands‑on Clangd example, all with clear code snippets and explanations.

C++CMakeClangd
0 likes · 44 min read
Master VSCode for C/C++ on Linux: Step‑by‑Step Compilation & Debugging Guide
php Courses
php Courses
Aug 28, 2025 · Fundamentals

Unlock C++ Power: Master Template Metaprogramming for Zero‑Cost Abstractions

Template Metaprogramming (TMP) leverages C++ templates to perform compile‑time calculations and code generation, offering zero‑cost abstractions, type safety, and performance gains, with examples like compile‑time factorials and type‑trait utilities, while modern C++ features such as constexpr and variable templates simplify its usage.

C++Zero-cost abstractioncompile‑time
0 likes · 10 min read
Unlock C++ Power: Master Template Metaprogramming for Zero‑Cost Abstractions
Deepin Linux
Deepin Linux
Aug 28, 2025 · Fundamentals

Unraveling C++ static: From Variables to Destruction Order

This article explains the many roles of the C++ static keyword—how it affects variables, functions and class members—then dives deep into static object lifetimes, destructor rules, destruction order across translation units, common pitfalls such as resource‑dependency bugs, memory leaks and multithreading issues, and finally offers practical solutions and interview‑style questions.

C++destructorinitialization-order
0 likes · 28 min read
Unraveling C++ static: From Variables to Destruction Order
Liangxu Linux
Liangxu Linux
Aug 27, 2025 · Fundamentals

Master C Pointers: Definition, Usage, and Practical Examples

This article explains what pointers are in the C language, how to define and use them, common scenarios such as dynamic memory allocation and array handling, and provides a complete, annotated example that demonstrates accessing and modifying variable values through pointers.

C++fundamentalsmemory management
0 likes · 4 min read
Master C Pointers: Definition, Usage, and Practical Examples
php Courses
php Courses
Aug 27, 2025 · Fundamentals

Mastering C++ STL: Vectors, Maps, and Sort with Real-World Examples

This tutorial explains the core components of the C++ Standard Template Library—vector, map, and sort—showing their basic usage, generic capabilities, and how they can be combined in practical code examples such as product sorting and a word‑frequency counter.

C++STLVector
0 likes · 12 min read
Mastering C++ STL: Vectors, Maps, and Sort with Real-World Examples
Liangxu Linux
Liangxu Linux
Aug 26, 2025 · Fundamentals

17 Common C Segmentation Fault Pitfalls and How to Avoid Them

This article walks through seventeen classic C programming mistakes that cause segmentation faults—such as null pointers, out‑of‑bounds array access, wild pointers, double frees, and format string bugs—and provides safe, production‑ready code examples to prevent each crash.

C++memory managementpointers
0 likes · 18 min read
17 Common C Segmentation Fault Pitfalls and How to Avoid Them
Deepin Linux
Deepin Linux
Aug 26, 2025 · Fundamentals

Master C/C++ Interview Essentials: Key Concepts, Code Samples & Tips

This comprehensive guide compiles essential C/C++ interview questions covering language fundamentals, data structures, algorithms, memory management, OOP principles, templates, and common coding patterns, providing clear explanations, example code, and practical insights to help both fresh graduates and experienced developers confidently tackle technical interviews.

AlgorithmsC++Data Structures
0 likes · 69 min read
Master C/C++ Interview Essentials: Key Concepts, Code Samples & Tips
php Courses
php Courses
Aug 26, 2025 · Fundamentals

Mastering C++ Class Templates: From Basics to Advanced Usage

This article explains the core concepts of C++ class templates, covering their definition, basic syntax, simple examples, multi-parameter templates, default parameters, specialization, and practical applications such as generic containers and a stack implementation, while offering best practices for effective template programming.

C++C++ best practicesclass templates
0 likes · 7 min read
Mastering C++ Class Templates: From Basics to Advanced Usage
php Courses
php Courses
Aug 25, 2025 · Fundamentals

Master C++ Inheritance: Concepts, Syntax, and Best Practices

This article explains C++ inheritance fundamentals, covering its purpose, basic syntax, public/protected/private inheritance types, construction/destruction order, method overriding with the override keyword, multiple and virtual inheritance, and practical guidelines for effective use.

@OverrideC++Multiple Inheritance
0 likes · 5 min read
Master C++ Inheritance: Concepts, Syntax, and Best Practices
Deepin Linux
Deepin Linux
Aug 25, 2025 · Fundamentals

Mastering std::move and std::forward: A Deep Dive into C++ Value Categories

This article explains the concepts of lvalues and rvalues in C++, how std::move converts a named object into an rvalue to enable move semantics, and how std::forward preserves the original value category for perfect forwarding in template functions, illustrated with clear examples and code snippets.

C++lvaluemove semantics
0 likes · 26 min read
Mastering std::move and std::forward: A Deep Dive into C++ Value Categories
Open Source Tech Hub
Open Source Tech Hub
Aug 24, 2025 · Backend Development

How PHPX 2.0 Lets You Write C++ with PHP‑Like Syntax

PHPX 2.0 is a re‑engineered extension library that lets developers write C++ code using PHP‑style dynamic syntax, offering safe memory handling, operator overloading, var‑keyword typing, and seamless integration with Composer and CMake for building high‑performance PHP extensions.

C++PHP extensionPHPX
0 likes · 13 min read
How PHPX 2.0 Lets You Write C++ with PHP‑Like Syntax
Deepin Linux
Deepin Linux
Aug 24, 2025 · Fundamentals

Why Is Stack Memory Faster Than Heap? A Deep Dive into Stack vs. Heap Allocation

This article explains the fundamental differences between stack and heap memory allocation, covering their allocation mechanisms, performance characteristics, common pitfalls such as stack overflow and memory leaks, practical code examples in C/C++, and typical interview questions to help developers choose the right memory model for their applications.

C++Heapallocation
0 likes · 65 min read
Why Is Stack Memory Faster Than Heap? A Deep Dive into Stack vs. Heap Allocation
Code Mala Tang
Code Mala Tang
Aug 24, 2025 · Backend Development

Can You Trust Your Compiler? Discover Hidden Bugs and Protection Tips

This article examines why compilers can be unreliable, explains how optimization errors, undefined‑behavior assumptions, and hardware‑specific code generation can introduce subtle bugs, presents real‑world examples from GCC, MSVC and Clang, and offers practical strategies to detect and avoid such compiler faults.

C++GCCMSVC
0 likes · 14 min read
Can You Trust Your Compiler? Discover Hidden Bugs and Protection Tips
Deepin Linux
Deepin Linux
Aug 23, 2025 · Fundamentals

How Does delete Know Memory Size? A Deep Dive into C++ Memory Management

This article explains C++ memory management fundamentals, detailing how delete and free release memory without explicit size knowledge, the role of stack, heap, data and code segments, differences between new/delete and malloc/free, array handling, common pitfalls, and interview questions with code examples.

C++DELETEHeap
0 likes · 34 min read
How Does delete Know Memory Size? A Deep Dive into C++ Memory Management
macrozheng
macrozheng
Aug 23, 2025 · Backend Development

Backend Essentials: TCP/UDP, HTTP, Linux, MySQL Indexes & C++ Basics

This article compiles essential backend knowledge, covering TCP vs UDP differences, why HTTP uses TCP, HTTP/2 and HTTP/3 improvements, status codes, long vs short connections, key Linux process commands, MySQL B+Tree indexing, C++ struct/class nuances, STL container types, map thread‑safety, and queue versus stack distinctions.

C++HTTPLinux
0 likes · 19 min read
Backend Essentials: TCP/UDP, HTTP, Linux, MySQL Indexes & C++ Basics
Deepin Linux
Deepin Linux
Aug 23, 2025 · Backend Development

Master C++ Autumn Recruitment: Essential Skills and Project Prep Guide

This guide outlines the critical C++ knowledge, interview topics, project selection strategies, resume writing tips, and post‑interview review techniques needed to secure a high‑paying C++ position during the competitive autumn recruitment season.

C++Job HuntingResume Writing
0 likes · 7 min read
Master C++ Autumn Recruitment: Essential Skills and Project Prep Guide
php Courses
php Courses
Aug 22, 2025 · Fundamentals

Why Use Function Templates in C++? A Complete Guide to Syntax and Usage

This article explains why function templates are needed in C++, shows their basic syntax, demonstrates how to instantiate and explicitly specify template arguments, and covers overloading, providing clear code examples that illustrate generic programming benefits.

C++Template Syntaxfunction templates
0 likes · 9 min read
Why Use Function Templates in C++? A Complete Guide to Syntax and Usage
Deepin Linux
Deepin Linux
Aug 22, 2025 · Fundamentals

When Does C++ Generate a Default Copy Constructor? Deep Dive and Pitfalls

This article explains what a copy constructor is, when the C++ compiler automatically generates a default copy constructor, and why relying on shallow copying can cause serious bugs, especially with inheritance, virtual functions, and resource‑managing members.

C++Deep CopyDefault Constructor
0 likes · 39 min read
When Does C++ Generate a Default Copy Constructor? Deep Dive and Pitfalls
php Courses
php Courses
Aug 21, 2025 · Fundamentals

When and How to Use C++ Friend Functions and Classes Effectively

Friend functions and friend classes in C++ provide controlled access to private and protected members, useful for operator overloading, tightly coupled classes, and global utilities, but must be used judiciously due to their asymmetry, non‑transitivity, and potential to break encapsulation; this guide explains concepts, syntax, examples, and best practices.

Access ControlC++Encapsulation
0 likes · 9 min read
When and How to Use C++ Friend Functions and Classes Effectively
Deepin Linux
Deepin Linux
Aug 21, 2025 · Fundamentals

How to Eliminate C/C++ Header File Circular Includes and Speed Up Compilation

This article explains why circular header inclusion in C/C++ causes compilation errors and performance issues, and provides practical solutions such as include guards, #pragma once, forward declarations, better file organization, and the PIMPL pattern, along with real‑world examples and interview‑style Q&A.

#pragma onceC++circular inclusion
0 likes · 24 min read
How to Eliminate C/C++ Header File Circular Includes and Speed Up Compilation
Liangxu Linux
Liangxu Linux
Aug 20, 2025 · Fundamentals

Unlock the Power of C’s static Keyword: Memory, Scope, and Real‑World Uses

This article explains the C static keyword, showing how it gives local variables persistent memory, restricts global symbols to a single file, and enables shared data across structs, with clear code examples, common patterns like singletons and cached Fibonacci, and important pitfalls to avoid.

C++Programming Fundamentalsmemory
0 likes · 12 min read
Unlock the Power of C’s static Keyword: Memory, Scope, and Real‑World Uses
php Courses
php Courses
Aug 19, 2025 · Fundamentals

Mastering Abstract Classes and Interfaces in C++: A Practical Guide

This article explains how C++ uses abstract classes and pure virtual functions to define interfaces, compares abstract classes with simulated interfaces, provides concrete code examples, and outlines common real‑world scenarios such as game objects, GUI widgets, and plugin systems.

Abstract ClassC++OOP
0 likes · 5 min read
Mastering Abstract Classes and Interfaces in C++: A Practical Guide