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

    [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)

    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?


  2. #2
    Join Date
    Jan 2006

    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

    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

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.