由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Quant版 - 来个题吧
相关主题
equity derivative research算quant么?[合集] 这几本金融编程的书,哪个适合初学者?
面试准备看书问题有人读过Modeling Derivatives Applications in Matlab, C++, and Excel
如何 针对 derivative pricing C++ 提高编程能力[合集] c++新手问题请教
请问 Onsite 的 programming test 大概会问哪种问题?虚心请教一道编程题
[London]Credit Derivative Quantprogrammers for financial institutions 3
[合集] 马上要读FE了,真诚求教选课问题金融书
[NYC]Mid-Level Equity Derivative Quant求助: ebook of “Modeling Derivatives Applications in Matlab, C++, and Excel”
[合集] 请教CS PhD想找quant工作该如何着手?现在quant和developer在工资上的没有差别
相关话题的讨论汇总
话题: class话题: derived话题: base话题: c++话题: than
进入Quant版参与讨论
1 (共1页)
j******n
发帖数: 271
1
How to ensure a class is derived directly no more than once in C++? That
is, how to prevent a class having more than one direct subclass? At
compile time, please.
J*****n
发帖数: 4859
2

private constructor?

【在 j******n 的大作中提到】
: How to ensure a class is derived directly no more than once in C++? That
: is, how to prevent a class having more than one direct subclass? At
: compile time, please.

j******n
发帖数: 271
3
That would work if you know the name of the class your client is to use,
like the following:
// your class
class Derived;
class Base
{
friend class Derived;
Base();
};
// your client:
class Derived : Base
{};
But that puts an unwanted restriction on your client.

【在 J*****n 的大作中提到】
:
: private constructor?

s***e
发帖数: 267
4
making the constructor a protected memeber?

【在 j******n 的大作中提到】
: How to ensure a class is derived directly no more than once in C++? That
: is, how to prevent a class having more than one direct subclass? At
: compile time, please.

1 (共1页)
进入Quant版参与讨论
相关主题
现在quant和developer在工资上的没有差别[London]Credit Derivative Quant
algo quant vs derivative quant[合集] 马上要读FE了,真诚求教选课问题
Quant intern position[NYC]Mid-Level Equity Derivative Quant
Mark Joshi的两本书[合集] 请教CS PhD想找quant工作该如何着手?
equity derivative research算quant么?[合集] 这几本金融编程的书,哪个适合初学者?
面试准备看书问题有人读过Modeling Derivatives Applications in Matlab, C++, and Excel
如何 针对 derivative pricing C++ 提高编程能力[合集] c++新手问题请教
请问 Onsite 的 programming test 大概会问哪种问题?虚心请教一道编程题
相关话题的讨论汇总
话题: class话题: derived话题: base话题: c++话题: than