shareddata.h
来自「一本语言类编程书籍」· C头文件 代码 · 共 19 行
H
19 行
// Exercise 11.3 Exercising SharedData - shareddata.h
// Definitions for Type enumeration and SharedData structure
enum Type { Double, Float, Long, Int, pDouble, pFloat, pLong, pInt};
struct SharedData {
union { // An anonymous union
double dData;
float fData;
long lData;
int iData;
double* pdData; // Pointers to
float* pfData; // various types
long* plData;
int* piData;
};
Type type; // Variable of the enumeration type Type
void show(); // Display a SharedData value
};
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?