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

📄 pair.hxx

📁 不错的国外的有限元程序代码,附带详细的manual,可以节省很多的底层工作.
💻 HXX
字号:
//   ******************
//   *** CLASS PAIR ***
//   ******************


#include <stdio.h>

class Pair
/* 
   This class implements key/value associations, e.g., the key 'E' and its
   value 210000. A pair is used as an entry in a dictionary.
 DESCRIPTION :
   A pair has three components : its name (a character), its value (a number),
   a pointer to the next pair in the dictionary.
 TASKS : 
   - Returning its key, or its value, or the next pair ;
   - Appending another pair to itself.
*/
{
   private :
      char    key ;
      double  value ;
      Pair*   next ;

   public :
      Pair (char k,double v)    { key=k ; value=v ; next=NULL ;}
      ~Pair ()                  { }

      void     append (Pair* p) { next = p ;}
      char     giveKey ()       { return key ;}
      Pair*    giveNext ()      { return next ;}
      double&  giveValue()      { return value ;}
      void     printYourself () { printf("   Pair (%c,%f)\n",key,value);}
} ;








⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -