Thread: VERY simple question

  1. #1
    Registered User
    Join Date
    Mar 2005
    Posts
    76

    VERY simple question

    Im not to familiar with c++ and im wondering what the : means in


    Code:
    Abc :: Abc(): somefunc()
    {
    
    }
    Googling on ':' doesnt really help

    I thought it is some sort of initialisation, but i cant seem to find a good description of it.

  2. #2
    Registered User Dante Shamest's Avatar
    Join Date
    Apr 2003
    Posts
    970
    Quote Originally Posted by johny145
    I thought it is some sort of initialisation, but i cant seem to find a good description of it.
    Yes, it's an initialization list for constructors. It's used to initialize base classes or object members that don't have a default constructor.

    This article describes them. And the Microsoft reference.

    edit:

    Bruce Eckel's Thinking in C++ also talks about them here.
    Last edited by Dante Shamest; 09-25-2005 at 09:50 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Simple question regarding variables
    By Flakster in forum C++ Programming
    Replies: 10
    Last Post: 05-18-2005, 08:10 PM
  2. Simple class question
    By 99atlantic in forum C++ Programming
    Replies: 6
    Last Post: 04-20-2005, 11:41 PM
  3. Simple question about pausing program
    By Noid in forum C Programming
    Replies: 14
    Last Post: 04-02-2005, 09:46 AM
  4. simple question.
    By InvariantLoop in forum Windows Programming
    Replies: 4
    Last Post: 01-31-2005, 12:15 PM
  5. simple fgets question
    By theweirdo in forum C Programming
    Replies: 7
    Last Post: 01-27-2002, 06:58 PM