A Function prototype I don't recognize...
Hi, I'm working through a Win32 C++ tutorial here: http://www.relisoft.com/win32/index.htm and there's a function definition (and implementation) within a class definition that I don't recognize. I wouldn't be too bothered but they use it all the time. Here's the code:
Code:
class WinSimpleClass
{
public:
WinSimpleClass (char const * name, HINSTANCE hInst)
: _name (name), _hInstance (hInst)
{}
WinSimpleClass (int resId, HINSTANCE hInst);
char const * GetName () const { return _name.c_str (); }
HINSTANCE GetInstance () const { return _hInstance; }
HWND GetRunningWindow ();
protected:
HINSTANCE _hInstance;
std::string _name;
};
The bit I don't understand is this:
Code:
WinSimpleClass (char const * name, HINSTANCE hInst)
: _name (name), _hInstance (hInst)
{}
Can anyone explain to me what this colon, followed by what appears to be two typecasts of some description(???!!), that precedes the function body means? (i've looked through just about every C++ tutorial to no avail :( )
Any help would be much appreciated.
Thanks,
Dom