[ create a new paste ] login | about

Link: http://codepad.org/1BGGUH3A    [ 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.
template<typename Arg>
cLabel *cControls::CreateLabel(Arg &&arg)
{
     cLabel *newLabel = new cLabel(std::forward<Arg>(arg));
     this->AddControl(newLabel);
    
     return newLabel;
}


Create a new paste based on this one


Comments: