[ create a new paste ] login | about

Link: http://codepad.org/PxyMUmq8    [ raw code | fork ]

C++, pasted on Nov 5:
1
2
3
4
5
6
7
8
9
//Creates a label and returns a pointer to it. cControls retains ownership, and the label will be destroyed in cControls' destructor.
cLabel *cControls::CreateLabel()
{
     cLabel *newLabel = new cLabel(); //Should be replaced with smart pointers in the future.

     this->AddControl(newLabel);

     return newLabel;
}


Create a new paste based on this one


Comments: