I saw the following code in a friend's program

Code:
class ABC
{
        public:
                std::string PQ;
        public:
                testIt();
};

//the line below is where I have an issue
ABC::ABC(std::string boo) : PQ(boo)
{
  //some code
}
He said it's declared that way, because the 'boo' value is being assigned to the PQ variable before the function body gets called.

My question is, why did C++ have a provision to assign a value in this way? Why not just assign it like
Code:
ABC::ABC(std::string boo)
{
  PQ=boo;
  //some code
}
Why did C++ provide the ": PQ(boo)" type of functionality?