registrar.hpp
来自「anneal_SimulatedAnnealing.rar用C语言编写」· HPP 代码 · 共 30 行
HPP
30 行
// registrar.hpp A (static) object for maintaining object serial numbers// for classes that care about such things. This particulary// useful for random number generators, so they don't always// generate the same sequence when declared as automatics// The registrar object is instantiated in the '.cpp' file// the user just calls the serial_number method://// int my_id = registrar.serial_number();//// rcsid: @(#)registrar.hpp 1.1 13:43:51 10/14/93 EFC#ifndef REGISTRAR_HPP_#define REGISTRAR_HPP_ 1.1class Registrar{ private: static unsigned int seq_no; public: Registrar(); ~Registrar() {} unsigned int serial_number();};extern Registrar registrar;#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?