[ create a new paste ] login | about

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

C++, pasted on Nov 5:
1
2
3
4
5
6
7
8
9
//Creates a cControl and returns a pointer to it. cControls retains ownership, and the label will be destroyed in cControls' destructor.
template<typename ControlType, typename Arg>
ControlType *cControls::Create(Arg &&arg)
{
     ControlType *newControl = new ControlType(std::forward<Arg>(arg));
     this->AddControl(newControl);

     return newControl;
}


Create a new paste based on this one


Comments: