Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

class function declarations 2

Status
Not open for further replies.

lordblood

Programmer
Nov 9, 2001
35
0
0
US

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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top