当前位置:网站首页>Define structure dynamically when macro is defined
Define structure dynamically when macro is defined
2022-06-21 14:21:00 【JDSH0224】
struct packet {
char type;
};#define TAILQ_HEAD(name, type) \
struct name { \
struct type *tqh_first; /* first element */ \
struct type **tqh_last; /* addr of last next element */ \
}void test()
{
TAILQ_HEAD(, packet) outgoing; // The label of the structure is NULL
TAILQ_HEAD(xxx, packet) outgoing1; // The label of the structure is xxx
}
边栏推荐
- In the autumn of 2022, from being rejected to sp+, talk about the experience and harvest of YK bacteria in 2021
- Pyqt5 learning notes of orange_ Basic structure of pyqt5 GUI program
- Qt-3-basic assembly 2
- 使用api制作我的足迹地图
- Atguigu---- conditional rendering
- Automation operation and maintenance 1 - installation and deployment of ansible
- Which futures trading platform is more secure. Ask for recommendation.
- Use map set or list set to store list set
- Kotlin - sequence sequence
- Oracle client11 and pl/sql12 installation
猜你喜欢

Automatic operation and maintenance 4 - variables and encryption in ansible

Automation operation and maintenance 1 - installation and deployment of ansible

618 Nuggets digital collection? Burberry and other luxury brands fight against metauniverse

Must the database primary key be self incremented? What scenarios do not suggest self augmentation?

Sliding validation tool class

Qt-4-common classes and components

Two of my essays

MySQL - table join and join

Configuring MySQL master-slave and implementing semi synchronous replication in docker environment

Simplified crud using code generation
随机推荐
Pyqt5 learning notes of orange_ Connect to SQL Server database
技术分享 | MySQL中一个聚类增量统计 SQL 的需求
Kotlin - i/o flow
3000 frame animation illustrating why MySQL needs binlog, redo log and undo log
Declare war on uncivilized code I
Simplified crud using code generation
Sort query results according to the input order of fuzzy query jancode
C language elementary level (10) type rename typedef
Automatic operation and maintenance 2 - common modules in ansible
Use map set or list set to store list set
网上开户安全吗?新手可以开账户吗
Some atom operations
Lamp architecture 4 -- MySQL source code compilation and use
Lamp architecture 6 -- MySQL master-slave replication and optimization method
Alibaba cloud link tracking is on the Net project (Jaeger trace)
Which futures trading platform is more secure. Ask for recommendation.
C language elementary order (VI) function
A blazor webassembly application that can automatically generate page components based on objects or types
Oracle client11 and pl/sql12 installation
Win10 install tensorflow