⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 shareddata.h

📁 一本语言类编程书籍
💻 H
字号:
// Exercise 11.4 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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -