H
herman
Hi,
I have a static class attribute in my class:
class A
{
public:
static B aB;
}
How can I allocate this static class attribute?
I think I need to do this
A::aB = ??? ;
If I do this:
A::aB = new B(); // where/when will aB be deleted if I allocate it on
the heap?
If I dont do anything, I have this linker error:
A.cpp:229: undefined reference to `A::aB'
I have a static class attribute in my class:
class A
{
public:
static B aB;
}
How can I allocate this static class attribute?
I think I need to do this
A::aB = ??? ;
If I do this:
A::aB = new B(); // where/when will aB be deleted if I allocate it on
the heap?
If I dont do anything, I have this linker error:
A.cpp:229: undefined reference to `A::aB'