C
ctick
I try to make a member of "dynamic_bitset" of a dynamic size that is
determined when its containing class is instantiated. The code has error
when compiling: "N is undefined" something like that. Obviously, N is
defined before x!
Does anyone know how to solve the problem?
Thanks in advance!
class bset
{
private:
int N;
boost::dynamic_bitset<> x(N);
public:
bset(int n);
};
bset::bset() : N(n)
{
}
void main()
{
bset bs;
...
}
determined when its containing class is instantiated. The code has error
when compiling: "N is undefined" something like that. Obviously, N is
defined before x!
Does anyone know how to solve the problem?
Thanks in advance!
class bset
{
private:
int N;
boost::dynamic_bitset<> x(N);
public:
bset(int n);
};
bset::bset() : N(n)
{
}
void main()
{
bset bs;
...
}