I'm a C programmer attempting to learn more about C++ programming. I've been looking at C++ header files to familiarize myself with class declarations. I understand a fair amount about how the class structure works but I'm trying to figure out this:
(from exception.h on a SUN Solaris workshop pro v4.2, just in case someone needs it)
class xmsg {
public:
xmsg( const char * );
virtual ~xmsg();
const char * why() const;
void raise();
protected:
xmsg();
const char * msg_;
};
Theres the class declaration. Now one particular function definition I have a question. Can someone explain to me the following function? I understand the inline part and its a protected constructor, but the ": msg_(0)" part has me confused.
inline xmsg::xmsg()
: msg_(0)
{
}
If you need more information, let me know.
Thanks in advance.