RE: [Dev-C++] In constructor parameter list x = null
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Ioannis V. <iv...@em...> - 2003-03-31 17:58:32
|
> -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf > Of Daniel Glenfield > Sent: Monday, March 31, 2003 4:00 PM > To: dev...@li... > Subject: [Dev-C++] In constructor parameter list x = null > > > Can someone explain this to me? It's in a header file for a class > declaration, for the only constructor of the class. > > CPenWidthsDlg(CWnd* pParent = NULL); > > It's derived from CDialog so I assume that's got something to > do with it. I > am just confused why the parameter is assigned a NULL value. > If I pass in a > pointer will it just get assigned to NULL? then what's the > point? To save me > from having to assign it to NULL in the constructor body or something? If you do not pass any value NULL is passed. In the invocation style: // ... CPenWidthsDlg(); // ... Ioannis Vranos * Programming pages: http://www.noicys.freeurl.com * Alternative URL: http://run.to/noicys |