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

📄 fibonacci.h

📁 《IAR EWARM 嵌入式系统 编程与实践》书中例程
💻 H
字号:
#include <iostream>
class fibonacci {
public:
  fibonacci()
    : current(1) {
    cout << "A fibonacci object was created." << endl;
  }

  fibonacci(int n)
    : current(n) {
    cout << "A fibonacci object that starts at fibonacci number "
         << n << " was created." << endl;
  }


  ~fibonacci() {
    cout << "A fibonacci object was destroyed." << endl;
  }


  // 函数 next
  unsigned long int next();

  // 函数 nth
  static unsigned long int nth(int nr);
protected:
  int current;

  static int initialized;
  static unsigned long int root[];

  static const int max_fib = 100;
};

⌨️ 快捷键说明

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