   Something I saw in a book...
  I saw something like the following code (this is an extreme condensed version) in a book:class LinkedList{  public:  LinkedList();  ~LinkedList();  LinkedList *NextNode;};LinkedList::LinkedList() : NextNode(0}{}//everything else why did they put NextNode(0) where they did, rather than just putting NextNode = NULL or something similar within the constructor braces? before I read this, in fact, I thought single colons were only used in polymorphism and such...shows how much I know   
  That's the member intiailization list syntax. It's a good idea to get in the habit of using it as much as possible. For non trivial member variables, such as std::string objects, using member initialization lists can be more efficient than assigning to them in the class's constructor. Moreover some member variables must be initialized in the initialization list, such as reference types.   ;  This has different uses.  One reason to use the initialization list is that the variable is initialized as it is created, and not created with garbage, and then initialized.  This can be faster, and with classes that are getting created and destroyed often, it can save time.  But it is not required.Here is an example where it is required...class Base{public:    // the initialization list is not required here...    Base( int xx, int yy ) : x(xx), y(yy) { }private:    int x, y;};class Child : public Base{public:    // this won't compile...    Child( int x, int y )    {Base(x, y);    }};I get this error when I compile this...Compiling...driver.cppt:\test\driver.cpp(20) : error C2512: 'Base' : no appropriate default constructor availableError executing cl.exe.driver.obj - 1 error(s), 0 warning(s)This must create a Base class first, before it can get the (x,y) data, but the base class must be passed the (x,y) data.  What to do...class Child : public Base{public:    // this works fine...    Child( int x, int y ) : Base(x,y) { }};Because we are now initializing stuff in the Base class as it is being created, this works fine.  As for as I know, there is no other way to do this if the Base class must be passed stuff in the constructor.   