bitset怎么编译成功
bitset<length>如何编译成功
#include<bitset>
template<size_t length>
class Test
{
private:
bitset<length> _bitset;
};
以上代码如何修改才能编译成功?
我希望能够这样使用它:Test<100> test;
希望大家帮忙解决,十分紧急.
------解决方案--------------------
#include<bitset>
template<size_t length>
class Test
{
private:
bitset<length> _bitset;
};
以上代码如何修改才能编译成功?
我希望能够这样使用它:Test<100> test;
希望大家帮忙解决,十分紧急.
------解决方案--------------------
- C/C++ code
#include <iostream> #include <bitset> using namespace std; template <size_t length> class Test { private: bitset <length> _bitset; }; int main() { Test<5> test; return 0; }
------解决方案--------------------
- C/C++ code
#include <iostream> #include <bitset> using namespace std; template <size_t length> class Test { private : bitset <length> _bitset; }; int main() { Test<100> test; return 0; }