Im not to familiar with c++ and im wondering what the : means in
Googling on ':' doesnt really helpCode:Abc :: Abc(): somefunc() { }
I thought it is some sort of initialisation, but i cant seem to find a good description of it.
Im not to familiar with c++ and im wondering what the : means in
Googling on ':' doesnt really helpCode:Abc :: Abc(): somefunc() { }
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.Originally Posted by johny145
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.