Example Code
//Attribute Initializer - header file
// File foo.h
class foo
{
static bar* m_bar;
};
//Attribute Initializer - implementation file
// File foo.cpp
bar* foo::m_bar = NULL;
//Constructor Initializer - Header file
// File foo.h
class foo
{
bar* m_bar;
foo();
};
//Constructor Initializer - Header file
// File foo.h
foo::foo():m_bar(NULL)
{
}
Was this helpful?