如果class内含const static integral data member,那么根据C++标志规格,我们可以在class之内直接给予初值。所谓integral泛指所有的整数型别(包括浮点数),不单只是指int,下面是一个例子:#includeusing namespace std;temp...
分类:
其他好文 时间:
2014-10-29 23:33:08
阅读次数:
356
如果class内含const static integral data member,那么根据C++标准规格,我们可以在class之内直接给予初值。所谓integral泛指所有整数型别,不单只是指int。例如:
#include
#include
#include
using namespace std;
template...
分类:
其他好文 时间:
2014-06-22 21:07:17
阅读次数:
203