CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2013
    Posts
    5

    [RESOLVED] Colon usage (single and double colon) Member initializer list?

    The below code is taken from the open source 7zip project (7z920\CPP\7zip\UI\FileManager\BrowseDialog.h)


    Code:
    class CBrowseDialog: public NWindows::NControl::CModalDialog
    {

    What does the single colon (CBrowseDialog:) mean? Is that Initializer List?

    I know the double colon (NWindows::NControl::CModalDialog) is Scope Resolution Operator.

    Why is (: public NWindows::NControl::CModalDialog) used with the class declaration?

    Similar code is found through out the project along with class declarations.

    Can someone help me with this?

    Thanks.

  2. #2
    Join Date
    Jan 2006
    Location
    Singapore
    Posts
    6,765

    Re: Colon usage (single and double colon) Member initializer list?

    The single colon indicates that CBrowseDialog inherits from NWindows::NControl::CModalDialog.
    C + C++ Compiler: MinGW port of GCC
    Build + Version Control System: SCons + Bazaar

    Look up a C/C++ Reference and learn How To Ask Questions The Smart Way
    Kindly rate my posts if you found them useful

  3. #3
    Join Date
    Aug 2013
    Posts
    5

    Re: Colon usage (single and double colon) Member initializer list?

    Thanks a lot laserlight.. Your answer is so precise and correct . I checked cpp inheritance code samples and you are correct . I was refreshing my cpp knowledge and got really confused between that and Initializer List. Now it is all clear to me.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured