当前位置:网站首页>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
}
边栏推荐
- Navigation bar switching, message board, text box losing focus
- Redis学习(1)——概述和常用命令
- 7hutool actual fileutil file tool class (common operation methods for more than 100 files)
- Using the path module to prompt errors in ts+vite projects
- PostgreSQL query by date range
- Alibaba cloud link tracking is on the Net project (Jaeger trace)
- Automatic operation and maintenance 3 - using playbook in ansible
- What are the log files in MySQL?
- C language elementary level (IX) enumeration
- Tcp/ip FAQs
猜你喜欢

Swift return button

Alibaba cloud link tracking is on the Net project (Jaeger trace)

Please, don't use pessimistic locks in high concurrency scenarios!

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

Reverse generate the corresponding DTD constraint according to the XML file

Viewing tcp/ip network communication from the sending of an email

Installation of MySQL 8.0.19 under alicloud lightweight application server linux-centos7

Mr. Ali taught you how to use JMeter for pressure test (detailed drawing)

Using the path module to prompt errors in ts+vite projects

Qt-6-file IO
随机推荐
What are the log files in MySQL?
哪個期貨平臺 交易更安全放心。求推薦。
MySQL - index
How does JMeter implement interface association?
Azure applicationinsights integrated in blazor
Compile time annotation automatically generates dataholder
Open source FTP server FileZilla server
Mr. Ali taught you how to use JMeter for pressure test (detailed drawing)
Compile time annotation
[graduation project recommendation] - personnel management system
2021-2022 recall of the final exam questions of non relational database of Shandong University
Reptile Foundation_ urllib
Explain the design idea and capacity expansion mechanism of ThreadLocal in detail
module ‘selenium. webdriver‘ has no attribute ‘PhantomJS‘
Declare war on uncivilized code II
Installation and application of MySQL 8.0 under Linux
Record the troubleshooting process of excessive CPU usage
Design and implementation of object system in redis
MySQL - built in functions
Chapter 2 - physical layer (I)