由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Quant版 - [合集] One C++ question
相关主题
相关话题的讨论汇总
话题: c++话题: singleton话题: question话题: eccentric话题: static
进入Quant版参与讨论
1 (共1页)
B*********h
发帖数: 800
1
☆─────────────────────────────────────☆
eccentric (eccentric) 于 (Thu Mar 22 12:31:00 2007) 提到:
This question does not come from an interview. However, since a lot of folks
here are interested in C++ and experts on C++, so I would expect some
helpful comments here.
There is an implementation of the Singleton pattern in Bruce Eckel's
"Thinking in C++" vol. 2, pp 620. It is as follows:
class Singleton {
static Singleton s;
public:
static Singleton& instance() {
1 (共1页)
进入Quant版参与讨论
相关主题
相关话题的讨论汇总
话题: c++话题: singleton话题: question话题: eccentric话题: static