Re: CMenusWin::CMenusWin() : m_str( m_szText, TEXT_SIZE )
- From: "Arkady Frenkel" <arkadyf@xxxxxxxxxxxxxxxx>
- Date: Fri, 1 Dec 2006 11:53:29 +0200
Strictly say m_str is class with two members ( one is char[] or
similar(string ) and second length ) or more, so first initialized with
value of m_szText and second ( length ) with TEXT_SIZE
Arkady
"SteveS" <SteveSpencer@xxxxxxxxxxxxxxxxx> wrote in message
news:C1C712F0-A5D8-403A-9D7B-2B21EBE2D6BA@xxxxxxxxxxxxxxxx
This is way off topic, being a straight C++ question, but I'm feeling
generous.
The single colon after the constructor argument list (which just happens
to
be empty in your case, permits the initialisation of members, or passing
arguments to the constructor of a base class. Effectively it's calling the
constructor for whatever m_str happens to be, passing two arguments.
The thing it's passing in, since the original c-tor argument list is
empty,
appears to be a member variable. Unless this is a simple type (I'm
guessing
some variation of char m_szText[TEXT_SIZE] ) this is not necessarily a
good
idea, since it may not have been initialised yet.
Further questions would be better in the C++ language newsgroups.
--
Steve S
"Muhammad Azeem Azam" wrote:
the first one the comstructor
whats the meaning of second colon
: m_str( m_szText, TEXT_SIZE )
.
- Prev by Date: Re: Is there a way to simulate "NET VIEW" programmatically? Can I
- Next by Date: Re: winsock
- Previous by thread: Re: How to detect firewall ?
- Next by thread: Any using Port 80 successfully for TCP/IP (non HTTP) traffic?
- Index(es):
Relevant Pages
|