Accessing Structure Address via Member Variables in C Language

Accessing Structure Address via Member Variables in C Language

1. The specific code and analysis are as follows #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <string.h> #include <stddef.h> /* Use a hypothetical structure at address 0 to get the offset of member */ #define OffsetOf(type,member) ( (unsigned int)&((type*)0)->member ) #if 0 /* typeof is an extension keyword of GCC compiler, mainly used to get the type … Read more

Understanding C++ Compilers: A Comprehensive Guide

Understanding C++ Compilers: A Comprehensive Guide

In C++ development, C++ Compiler is the core tool that converts your written C++ source code (.cpp files) into machine code (or intermediate code) executable by computers. Without a compiler, your C++ programs cannot run. Therefore, choosing a suitable C++ compiler is the first step in starting C++ programming. 🎯 1. What is a C++ … Read more

Building an Embedded TDD Environment for 2025: MSYS2 + CppUTest

Building an Embedded TDD Environment for 2025: MSYS2 + CppUTest

1. Background: Classics and Obsolescence (The Gap) Recently, I have been studying James Grenning’s classic work “Test-Driven Development for Embedded C”. The TDD (Test-Driven Development) philosophy and the Dual-Targeting strategy presented in the book are very robust and serve as a good remedy for solving the coupling of embedded business logic. However, the accompanying source … Read more

The Crossroads of GCC Programming on Windows: Choosing Between MinGW and Cygwin for Double the Efficiency!

The Crossroads of GCC Programming on Windows: Choosing Between MinGW and Cygwin for Double the Efficiency!

Introduction: A Long-standing Dilemma for Many Programmers If you want to use the familiar GCC compiler to compile a C/C++ project on Windows, a quick search online will immediately present you with two “similar” options: MinGW and Cygwin. Both allow you to run commands like gcc, g++, and gdb on Windows, but which one should … Read more

Introduction to Linux System Programming: Write Your First Hello World Program from Scratch

Introduction to Linux System Programming: Write Your First Hello World Program from Scratch

When we learn any programming language, the first program is often the classic “Hello World”. Linux system programming is no exception! Today, I will guide you step by step to complete your first program in a Linux environment and understand the principles behind it. (The following demonstration uses the Ubuntu 22.04 distribution) πŸ†š Linux vs … Read more

GCC Jointly Launches CANN Ecosystem Co-Creation Plan to Support CANN Ecosystem Development

GCC Jointly Launches CANN Ecosystem Co-Creation Plan to Support CANN Ecosystem Development

GCC NEWS On November 14, 2025, during the “Ascend CANN Open Source Salon – Zhejiang Station” event held in Hangzhou, the Global Computing Coalition (GCC) collaborated with Hangzhou Tiankuan Technology Co., Ltd., Hangzhou Artificial Intelligence Computing Center, and the Zhejiang Ascend Ecological Innovation Center to jointly launch the “CANN Ecosystem Co-Creation Plan,” marking a solid … Read more

Latest Linux News – November 17, 2025

Latest Linux News - November 17, 2025

πŸ“š Open Source Technology DailyExploring the Infinite Possibilities of the Open Source World2025/11/17✨ Qt Abandons Direct Use of RDRAND/RDSEED to Improve Performance and Reduce ErrorsThe Qt toolkit is gradually phasing out direct reliance on the RDRAND and RDSEED instructions from the CPU for random number generation, opting instead for entropy sources provided by the operating … Read more

Basic Operations for Compiling with gcc and g++

Generally, compilation requires support from library files. For example, static library files and dynamic library files. On Windows, .lib files are static library files. .dll files are dynamic library files. The suffix for library files is as follows: The suffix for static library files is .a. The suffix for dynamic library files is .so. The … Read more

Master Wang Daocheng’s Evening Self-Study Training on C Language

C language is one of the earliest programming languages, developed at Bell Labs in 1972. In 1972, Dennis Ritchie designed the C language, inheriting many ideas from the B language and adding the concept of data types and other features. Although the C language was developed alongside the UNIX operating system, it is not limited … Read more

Hello, World! in C Language

Every programming language typically starts with printing “Hello, World!”C is a general-purpose, efficient, low-level programming language, despite being decades old, it remains vibrant and consistently ranks in the top three of programming language rankings. It is often referred to as the “God programming language” because many modern programming languages (such as C++, Java, C#, Go, … Read more