Tagged articles
819 articles
Page 2 of 9
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.

CC++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.

CC++Recursion
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.

AndroidCFrida
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.

CC++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.

CPOSIXTimers
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.

Cbest 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.

CCopy-on-WriteSystem Call
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.

CError 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.

BackendCGo
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.

CThrowcatch
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.

CCMakeClangd
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.

CCompile-timeTemplate Metaprogramming
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.

Cdestructorinitialization-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.

CMemory Managementfundamentals
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.

CMAPSTL
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.

CMemory 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.

AlgorithmsCData 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.

CC++ 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.

CMultiple InheritanceOverride
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.

Clvaluemove 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.

CPHP 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.

CHeapMemory Management
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.

CMSVCUndefined Behavior
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.

CDELETEFree
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.

Backend DevelopmentCHTTP
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.

CInterview PreparationJob Hunting
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.

Cfunction templatesgeneric programming
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.

CCopy ConstructorDefault 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.

CEncapsulationaccess control
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 onceCcircular 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.

CMemoryprogramming fundamentals
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 ClassCInterface
0 likes · 5 min read
Mastering Abstract Classes and Interfaces in C++: A Practical Guide
php Courses
php Courses
Aug 18, 2025 · Fundamentals

Mastering Polymorphism in C++: Virtual Functions, Override, and Final

This article explains C++ polymorphism, covering virtual functions, the override and final keywords, pure virtual functions, virtual destructors, vtable implementation, performance considerations, modern C++ improvements, and practical examples with code snippets.

Abstract ClassCOverride
0 likes · 9 min read
Mastering Polymorphism in C++: Virtual Functions, Override, and Final
Deepin Linux
Deepin Linux
Aug 17, 2025 · Fundamentals

Mastering C++ Singleton: 5 Implementations, Pitfalls & Performance Tips

This article explains why the singleton pattern is essential for global resources in C++, walks through five concrete implementations—from basic lazy and eager versions to thread‑safe double‑checked locking and C++11 static locals—analyzes their performance and resource trade‑offs, and provides a complete printer‑singleton case study with build and run instructions.

CC++11Design Patterns
0 likes · 26 min read
Mastering C++ Singleton: 5 Implementations, Pitfalls & Performance Tips
Liangxu Linux
Liangxu Linux
Jul 31, 2025 · Backend Development

How to Build and Test a Simulated GPIO Character Driver on Linux

This tutorial walks through creating a Linux kernel character driver that simulates four GPIO devices, compiles the module, loads it to automatically generate /dev/mygpio0‑3 nodes, and provides a user‑space program to control the GPIO states via ioctl, including full build and cleanup steps.

CGPIOMakefile
0 likes · 12 min read
How to Build and Test a Simulated GPIO Character Driver on Linux
Liangxu Linux
Liangxu Linux
Jul 24, 2025 · Fundamentals

How to Embrace Object‑Oriented Design in Pure C

This article demonstrates how to simulate object‑oriented programming in C by using structs and function pointers, defines a list interface, provides a full implementation with insertion, deletion, traversal, and testing code, and explains why such techniques improve readability and maintainability.

CData Structuresfunction pointers
0 likes · 10 min read
How to Embrace Object‑Oriented Design in Pure C
Java Tech Enthusiast
Java Tech Enthusiast
Jul 24, 2025 · Backend Development

Ace Your Java Interview: Key Concepts, Thread States, and Linux Tips

This article provides a comprehensive Java interview guide covering effective self‑introduction, showcasing internship contributions, comparing Java and C++ features, explaining method overloading versus overriding, clarifying process‑thread differences and thread lifecycle states, and offering essential Linux commands for memory monitoring and file searching.

CThreadinterview
0 likes · 11 min read
Ace Your Java Interview: Key Concepts, Thread States, and Linux Tips
php Courses
php Courses
Jul 24, 2025 · Fundamentals

Master C++ Default Arguments and Inline Functions: When and How to Use Them

This article explains C++ default arguments and inline functions, covering their definitions, syntax, rules, practical code examples, advantages, appropriate use cases, and key considerations, and compares the two features to help developers write clearer and more efficient code.

Cdefault-argumentsinline functions
0 likes · 5 min read
Master C++ Default Arguments and Inline Functions: When and How to Use Them
Deepin Linux
Deepin Linux
Jul 24, 2025 · Fundamentals

Boosting Large-Scale std::vector Performance: Memory, Moves, and SIMD

This article examines why std::vector can become a bottleneck when handling millions of elements, analyzes memory consumption, insertion/deletion costs, and cache behavior, and presents practical optimizations such as pre‑allocation, move semantics, SIMD vectorization, and cache‑friendly designs illustrated with real‑world case studies and code examples.

CMemory OptimizationSIMD
0 likes · 21 min read
Boosting Large-Scale std::vector Performance: Memory, Moves, and SIMD
php Courses
php Courses
Jul 23, 2025 · Fundamentals

Mastering Function Overloading in C++: When and How to Use It

Function overloading in C++ lets you define multiple functions with the same name but different parameter lists, enabling the compiler to select the appropriate version based on argument types, while highlighting rules, implicit conversions, pitfalls, and comparisons with function templates.

CCode Examplesfunction overloading
0 likes · 6 min read
Mastering Function Overloading in C++: When and How to Use It
php Courses
php Courses
Jul 22, 2025 · Fundamentals

When Should You Use Pass‑by‑Value, Reference, or Pointer in C++?

Understanding C++ parameter passing—by value, by reference, and by pointer—is essential for optimizing performance, memory usage, and data safety, and this guide explains each method’s characteristics, provides code examples, and offers practical advice on selecting the appropriate technique for different scenarios.

CFunction ParametersPass by Reference
0 likes · 6 min read
When Should You Use Pass‑by‑Value, Reference, or Pointer in C++?
php Courses
php Courses
Jul 18, 2025 · Fundamentals

Master C++ Functions: Definitions, Calls, Parameters, and Scope Explained

This article provides a comprehensive guide to C++ functions, covering their definition syntax, various calling methods, parameter passing mechanisms, return value handling, and variable scope rules, supplemented with clear code examples and practical demonstrations.

CParameter PassingReturn values
0 likes · 6 min read
Master C++ Functions: Definitions, Calls, Parameters, and Scope Explained
Deepin Linux
Deepin Linux
Jul 17, 2025 · Fundamentals

Why Traditional C++ Memory Management Fails and How TCMalloc Boosts Performance

Modern C++ applications face severe performance bottlenecks due to traditional memory management techniques like new/delete and malloc/free, which cause fragmentation and high overhead; TCMalloc, a thread‑caching allocator from Google, dramatically reduces latency, improves memory utilization, and scales efficiently across multithreaded workloads.

CMemory ManagementTCMalloc
0 likes · 29 min read
Why Traditional C++ Memory Management Fails and How TCMalloc Boosts Performance
Deepin Linux
Deepin Linux
Jul 17, 2025 · Fundamentals

Unlock Faster C++ Performance: Master Memory Pools and Eliminate Fragmentation

This article explains why traditional C++ new/delete memory management leads to internal and external fragmentation and performance loss, introduces the concept and principles of memory pools, compares various pool implementations, and provides a complete, thread‑safe example that integrates with std::allocator for high‑efficiency allocation.

AllocatorCMemory Management
0 likes · 29 min read
Unlock Faster C++ Performance: Master Memory Pools and Eliminate Fragmentation
php Courses
php Courses
Jul 17, 2025 · Fundamentals

Master C++11 Range-Based for Loops: Simplify Your Iterations

This article explains C++11’s range-based for loop, covering its syntax, practical examples for arrays, vectors, maps, and how to use auto type deduction and references to modify elements, while highlighting its advantages over traditional loops and outlining suitable use cases and pitfalls.

CC++11STL
0 likes · 6 min read
Master C++11 Range-Based for Loops: Simplify Your Iterations
php Courses
php Courses
Jul 16, 2025 · Fundamentals

Master C++ Loop Control: When to Use break vs continue

This article explains C++ loop control statements, detailing the syntax, use cases, and differences of break and continue, and provides multiple code examples demonstrating how to exit loops early or skip iterations for tasks such as searching and data filtering.

Cbreakcontinue
0 likes · 7 min read
Master C++ Loop Control: When to Use break vs continue
Huolala Tech
Huolala Tech
Jul 16, 2025 · Mobile Development

Why iOS 18 Crashes When exit() Is Called and How to Fix It

This article analyzes a driver‑side iOS 18 crash triggered by BackBoardServices calling exit, explains the underlying XPC and C++ destructor chain, explores failed hook and compiler‑flag workarounds, and presents a reliable atexit‑based solution that eliminates the crash on iOS 18 and later.

CHookingMobile Development
0 likes · 15 min read
Why iOS 18 Crashes When exit() Is Called and How to Fix It
Deepin Linux
Deepin Linux
Jul 15, 2025 · Fundamentals

Mastering LRU Cache: Theory, C++ Implementation, and Interview Strategies

This article explains the core principles of the Least Recently Used (LRU) cache algorithm, details its operation and complexity, provides a complete C++ implementation with line-by-line analysis, showcases test cases, and offers practical interview tips and extensions such as LFU and LRU‑K.

CCacheLRU
0 likes · 18 min read
Mastering LRU Cache: Theory, C++ Implementation, and Interview Strategies
php Courses
php Courses
Jul 15, 2025 · Fundamentals

Master C++ Loops: When to Use for, while, and do-while

Learn the three core C++ loop structures—for, while, and do-while—including their syntax, practical examples, control statements like break and continue, plus common pitfalls to avoid for reliable programming.

CLoopscontrol statements
0 likes · 6 min read
Master C++ Loops: When to Use for, while, and do-while
php Courses
php Courses
Jul 14, 2025 · Fundamentals

Master C++ Conditional Statements: if, else, switch, and Ternary Operator

This tutorial explains C++ conditional control structures—including if, if-else, else-if, switch, and the ternary ?: operator—detailing their syntax, usage, and providing clear code examples that demonstrate how to implement each construct for decision-making in programs.

Cconditional statementsif-else
0 likes · 5 min read
Master C++ Conditional Statements: if, else, switch, and Ternary Operator
php Courses
php Courses
Jul 11, 2025 · Fundamentals

Master C++ I/O: When to Use cin/cout vs printf/scanf

This article explains C++ input/output fundamentals, comparing the object‑oriented cin/cout streams with the C‑style printf/scanf functions, providing code examples, feature comparisons, common pitfalls, and best‑practice recommendations to help developers choose the right approach for safety and performance.

CInput/Outputbest-practices
0 likes · 7 min read
Master C++ I/O: When to Use cin/cout vs printf/scanf
Deepin Linux
Deepin Linux
Jul 10, 2025 · Fundamentals

Mastering LRUCache: How to Build a High‑Performance Cache in C++

Explore the principles behind Least Recently Used (LRU) caching, understand why it outperforms FIFO and LFU strategies, and follow a step‑by‑step C++ implementation using hash tables and doubly linked lists, complete with detailed code, testing, and performance optimization tips.

CCacheData Structure
0 likes · 24 min read
Mastering LRUCache: How to Build a High‑Performance Cache in C++
Deepin Linux
Deepin Linux
Jul 9, 2025 · Fundamentals

Mastering Perfect Forwarding in C++: Boost Performance and Flexibility

This article explains the concept of perfect forwarding in C++11, demonstrates how to preserve value categories using universal references and std::forward, and provides practical examples such as generic factory functions, wrapper functions, reference collapsing rules, and common pitfalls to avoid.

CUniversal Referencesmove semantics
0 likes · 21 min read
Mastering Perfect Forwarding in C++: Boost Performance and Flexibility
php Courses
php Courses
Jul 7, 2025 · Fundamentals

Master the Classic C++ Hello World: Step-by-Step Code Walkthrough

Learn how to write, compile, and run a basic C++ Hello World program, with a complete code listing, line-by-line explanations of each statement, common variations, compilation commands, and tips for understanding the program’s structure and output.

CCode WalkthroughCompilation
0 likes · 6 min read
Master the Classic C++ Hello World: Step-by-Step Code Walkthrough
Deepin Linux
Deepin Linux
Jul 5, 2025 · Fundamentals

Master GDB: Essential Debugging Techniques for C/C++ Developers

This comprehensive guide explains what GDB is, how to launch it, its core functions, essential debugging commands, multithreaded debugging strategies, and practical code examples, helping developers efficiently locate and fix bugs in C/C++ programs.

CDebugginggdb
0 likes · 21 min read
Master GDB: Essential Debugging Techniques for C/C++ Developers
php Courses
php Courses
Jul 4, 2025 · Fundamentals

Set Up a Powerful C++ Development Environment for Windows, Linux, macOS

This guide walks you through installing and configuring four major C++ development tools—Visual Studio, GCC, Clang, and CMake—covering platform-specific steps for Windows, Linux, and macOS, and highlights each tool’s advantages to help you choose the right environment for your projects.

CCMakeClang
0 likes · 6 min read
Set Up a Powerful C++ Development Environment for Windows, Linux, macOS
Deepin Linux
Deepin Linux
Jul 4, 2025 · Backend Development

Mastering Protocol Buffers in C++: Installation, Data Types, and Real‑World Use Cases

This comprehensive guide explains what Protocol Buffers are, why they outperform JSON and XML, how to install and configure the library, the supported data types, code generation for multiple languages, practical C++ examples, and typical scenarios such as distributed systems, storage, and network communication.

CData StructuresDistributed Systems
0 likes · 23 min read
Mastering Protocol Buffers in C++: Installation, Data Types, and Real‑World Use Cases
Deepin Linux
Deepin Linux
Jul 3, 2025 · Fundamentals

Mastering std::vector: From Basics to Interview‑Level Implementation

This article walks through the fundamentals of C++'s std::vector, covering its basic concepts, common use cases, detailed implementation of key operations like push_back, pop_back, and iterators, deep source‑code analysis, and practical interview strategies for hand‑coding the container.

CData StructuresMemory Management
0 likes · 18 min read
Mastering std::vector: From Basics to Interview‑Level Implementation
Deepin Linux
Deepin Linux
Jul 3, 2025 · Fundamentals

Mastering const vs constexpr in C++: Key Differences and Interview Tips

This article explains the distinct roles of const and constexpr in C++, covering their usage with variables, pointers, function parameters, and class members, comparing compile‑time and run‑time behaviors, and offering practical interview strategies and code examples for developers.

CCompile-timeconst
0 likes · 19 min read
Mastering const vs constexpr in C++: Key Differences and Interview Tips
Architect's Guide
Architect's Guide
Jul 2, 2025 · Mobile Development

How We Built a Cross‑Platform Architecture for WeChat Pay on iOS & Android

This article explains how the fragmented iOS and Android implementations of WeChat Pay were unified by introducing a C++ cross‑platform framework, abstracting business flows into UseCases, adding a routing mechanism, redesigning network request handling, and standardizing data passing to improve stability, reduce code size, and boost development productivity.

CUseCaseWeChat Pay
0 likes · 15 min read
How We Built a Cross‑Platform Architecture for WeChat Pay on iOS & Android
php Courses
php Courses
Jul 1, 2025 · Fundamentals

From C with Classes to Modern C++: A 40‑Year Evolution

This article traces C++ from its 1979 origins as “C with Classes” through successive standards—C++98, C++11, C++14, C++17, C++20, and C++23—highlighting key features, the language’s modern capabilities, current applications, and future directions up to the planned C++26.

CProgramming LanguageStandards
0 likes · 6 min read
From C with Classes to Modern C++: A 40‑Year Evolution
Deepin Linux
Deepin Linux
Jul 1, 2025 · Backend Development

Master C++ Concurrency: Processes, Threads, and IO Multiplexing Explained

This article explores C++ concurrent programming techniques, covering multi‑process fundamentals, process creation with fork(), inter‑process communication methods, multi‑threading using std::thread, synchronization tools like mutexes and condition variables, and efficient I/O handling through select, poll, and epoll multiplexing, with practical code examples.

CIO MultiplexingThreads
0 likes · 26 min read
Master C++ Concurrency: Processes, Threads, and IO Multiplexing Explained
Deepin Linux
Deepin Linux
Jun 30, 2025 · Fundamentals

Boost C++ Performance with Fixed-Size Memory Pools: Theory and Code

This article explains why frequent dynamic memory allocation can cause slowdown and fragmentation, introduces fixed-size memory pools as an efficient solution, details their core principles, data structures, key allocation and deallocation functions, and demonstrates their performance advantage with C++ code examples and benchmarks.

CMemory Fragmentationcustom allocator
0 likes · 20 min read
Boost C++ Performance with Fixed-Size Memory Pools: Theory and Code
IT Services Circle
IT Services Circle
Jun 27, 2025 · Fundamentals

How to Solve the Champagne Tower Problem on LeetCode with Linear DP

The article first reflects on ByteDance's expanding English testing policy, then presents LeetCode problem 799 “Champagne Tower”, describing its mechanics and offering a linear‑DP solution with full implementations in Java, C++, Python and TypeScript, along with complexity analysis.

CDPLeetCode
0 likes · 8 min read
How to Solve the Champagne Tower Problem on LeetCode with Linear DP
Deepin Linux
Deepin Linux
Jun 23, 2025 · Fundamentals

Mastering std::vector: From Basics to Deep Implementation Insights

This article recounts a challenging Pinduoduo C++ interview question to hand‑write std::vector, then thoroughly explains its basic concepts, core interfaces, memory management, iterator behavior, source‑code analysis, and interview strategies, providing code examples and practical tips for mastering this essential container.

CData Structuresstd::vector
0 likes · 18 min read
Mastering std::vector: From Basics to Deep Implementation Insights
Liangxu Linux
Liangxu Linux
Jun 15, 2025 · Fundamentals

Functional vs Imperative Programming in Embedded Systems: Which Wins?

This article compares functional and imperative (non‑functional) programming approaches for embedded applications, examining testability, maintainability, performance, and resource usage, and provides concrete C code examples illustrating each paradigm’s trade‑offs, helping developers choose the right style for their constraints.

Cembedded systemsfunctional programming
0 likes · 8 min read
Functional vs Imperative Programming in Embedded Systems: Which Wins?
Deepin Linux
Deepin Linux
Jun 15, 2025 · Fundamentals

How C++ Polymorphism Cuts Tight Coupling and Boosts Code Reuse

This article explains C++ polymorphism, shows how virtual functions and inheritance break tight coupling, improve code reuse, simplify extensions, and enhance maintainability, and demonstrates its role in common design patterns such as Strategy and Factory Method with clear code examples.

CDesign PatternsOOP
0 likes · 20 min read
How C++ Polymorphism Cuts Tight Coupling and Boosts Code Reuse
21CTO
21CTO
Jun 13, 2025 · Fundamentals

Can Rust Outrun C? Exploring When Rust Beats C in Performance

This article examines a Reddit question about whether Rust can be faster than C under identical conditions, discussing inline assembly, struct layout differences, safety checks, compile‑time versus run‑time behavior, and concluding that there is no inherent speed advantage.

CRustinline assembly
0 likes · 7 min read
Can Rust Outrun C? Exploring When Rust Beats C in Performance
Python Programming Learning Circle
Python Programming Learning Circle
Jun 7, 2025 · Fundamentals

How to Choose the Right Programming Language for Your Project

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.

CC++Java
0 likes · 9 min read
How to Choose the Right Programming Language for Your Project
Liangxu Linux
Liangxu Linux
Jun 7, 2025 · Fundamentals

Unlock the Hidden Power of C Macros: From Basics to Advanced Tricks

This article explains C preprocessor macros in depth, covering simple constant replacement, parameterized macros, stringification, token‑pasting, predefined macros, variadic macros, conditional compilation tricks, common pitfalls, and best‑practice recommendations for safe usage.

CCode GenerationDebugging
0 likes · 11 min read
Unlock the Hidden Power of C Macros: From Basics to Advanced Tricks
Deepin Linux
Deepin Linux
May 28, 2025 · Fundamentals

Understanding Heap Memory Management in C: Detailed Guide to malloc and free

This article provides a comprehensive overview of heap memory management in C, explaining the concepts of heap versus stack, the usage and internal mechanisms of malloc and free, common pitfalls such as memory leaks and dangling pointers, and compares these functions with new/delete, calloc, and realloc.

CFreeHeap
0 likes · 29 min read
Understanding Heap Memory Management in C: Detailed Guide to malloc and free
Liangxu Linux
Liangxu Linux
May 26, 2025 · Fundamentals

Why the ‘volatile’ Keyword Saves Your Embedded C Code (And Common Misconceptions)

Understanding C’s volatile keyword is essential for embedded programming: it prevents compiler optimizations on variables that may change unexpectedly, such as hardware registers or signal‑handler flags, and clarifies common misconceptions about memory visibility, atomicity, and proper usage scenarios.

CCompiler Optimizationembedded programming
0 likes · 9 min read
Why the ‘volatile’ Keyword Saves Your Embedded C Code (And Common Misconceptions)
Liangxu Linux
Liangxu Linux
May 21, 2025 · Fundamentals

Unlock C Memory Layout: From Stack to Heap Explained with Real Code

This article demystifies C's memory layout by comparing it to a house, detailing each segment—from the stack and heap to global variables and the code section—while providing clear examples, common pitfalls, debugging tips, and interactive challenges to solidify understanding.

Cmemory layoutprogramming fundamentals
0 likes · 15 min read
Unlock C Memory Layout: From Stack to Heap Explained with Real Code
Liangxu Linux
Liangxu Linux
May 20, 2025 · Fundamentals

Why Pointers Exist: A Storytelling Guide to Mastering C Pointers

This article explains the historical reasons behind the invention of pointers, walks through early memory manipulation, variable abstraction, the need for shared data, and demonstrates how pointers enable address passing, dynamic memory allocation, and complex data structures such as linked lists and trees, all with clear C code examples.

CMemory Managementdynamic allocation
0 likes · 15 min read
Why Pointers Exist: A Storytelling Guide to Mastering C Pointers
Linux Code Review Hub
Linux Code Review Hub
Apr 30, 2025 · Fundamentals

Understanding DRM: From Application‑Level Programs to Kernel Drivers

This article explains the Linux DRM graphics framework, its three main components (libdrm, KMS, GEM), the essential elements for display pipelines, and provides step‑by‑step example programs for single‑buffer, double‑buffer, page‑flip, and plane‑based rendering, including complete source code and execution notes.

CDRMDisplay
0 likes · 19 min read
Understanding DRM: From Application‑Level Programs to Kernel Drivers
Tencent Cloud Developer
Tencent Cloud Developer
Apr 28, 2025 · Backend Development

Performance Optimization Techniques for High‑Throughput Backend Systems

The article outlines seven practical performance‑optimization techniques for high‑throughput back‑ends—including replacing protobuf with native C++ classes, adopting cache‑friendly data structures, using jemalloc/tcmalloc, implementing lock‑free double buffers, simplifying structs for specific scenarios, and leveraging profiling tools—while stressing balanced, incremental improvements.

Backend DevelopmentCCache Friendly
0 likes · 16 min read
Performance Optimization Techniques for High‑Throughput Backend Systems
Java Tech Enthusiast
Java Tech Enthusiast
Apr 26, 2025 · Fundamentals

Valid Parentheses Problem – Solution, Explanation, and Mid‑Career Insights

The article reflects on why mid‑career engineers are often relegated to legacy‑maintenance work, argues that such roles can be leveraged for growth by modernizing systems and adopting AI, and then presents the classic Valid Parentheses coding challenge, explaining a stack‑based solution with implementations, complexity analysis, and common pitfalls.

CJavaPython
0 likes · 14 min read
Valid Parentheses Problem – Solution, Explanation, and Mid‑Career Insights
Deepin Linux
Deepin Linux
Apr 21, 2025 · Backend Development

POSIX Multithreading and Network Programming in C: Threads, Synchronization, and Socket APIs

This article introduces the POSIX standard for portable multithreaded and network programming in C, explains thread creation, lifecycle, and synchronization mechanisms such as mutexes, semaphores and condition variables, and provides complete server‑client socket examples together with practical multithreaded file‑processing code and debugging tips.

CPOSIXSocket
0 likes · 23 min read
POSIX Multithreading and Network Programming in C: Threads, Synchronization, and Socket APIs
Liangxu Linux
Liangxu Linux
Apr 17, 2025 · Fundamentals

15 Common C Language Pitfalls Every Developer Should Avoid

This article enumerates fifteen frequent C programming traps—from operator precedence and case‑sensitivity to pointer misuse and multithreading issues—provides clear code examples, explains why each error occurs, and offers practical solutions plus a challenging interview question.

CPitfallscode safety
0 likes · 13 min read
15 Common C Language Pitfalls Every Developer Should Avoid
Python Programming Learning Circle
Python Programming Learning Circle
Apr 2, 2025 · Fundamentals

Performance Comparison of Over 40 Programming Languages on a 1‑Billion‑Iteration Nested Loop

A comprehensive benchmark on an M3 MacBook Pro measures how compiled languages like C, Rust and Java outperform interpreted languages such as Python, Ruby and PHP when executing a billion‑iteration nested loop and a Fibonacci calculation, providing version details, test methodology, and practical recommendations for compute‑intensive projects.

CRustcompiled vs interpreted
0 likes · 6 min read
Performance Comparison of Over 40 Programming Languages on a 1‑Billion‑Iteration Nested Loop
Deepin Linux
Deepin Linux
Mar 29, 2025 · Fundamentals

Deep Dive into Linux task_struct: Core Data Structure for Process Management

This article provides a comprehensive overview of the Linux kernel's task_struct structure, detailing its key fields, process and thread identification, state definitions, memory and credential handling, kernel stack layout, and includes a practical kernel module example for iterating over all processes.

CSchedulingprocess management
0 likes · 41 min read
Deep Dive into Linux task_struct: Core Data Structure for Process Management