【发布时间】:2014-08-06 16:55:09
【问题描述】:
我被告知要以某种方式完成这项任务。默认情况下为bitarray制作一个unsigned int模板,并且向量保存它,但现在我收到错误C4430。
#include <vector>
template<class IType = unsigned int>
class BitArray {
private:
size_t numbits;
size_t capacity;
vector<IType> bits;
}
【问题讨论】:
-
std::在vector之前丢失??你在哪里使用这个类? -
你还应该有
#include <cstdlib>和std::size_t。