我正在尝试这样做(使用自定义类和 STL shared_ptr from #include <memory>
):
shared_ptr<Label> BufLbl;
BufLbl = allocate_shared<Label>(Label());
BufLbl->YCoord = 3;
BufLbl->XCoord = 2;
BufLbl->Width = 5;
BufLbl->Data = "Day 1";
Screen.Controls.push_back(BufLbl);
BufLbl = allocate_shared<Label>(Label());
BufLbl->YCoord = 4;
BufLbl->XCoord = 6;
BufLbl->Width = 1;
BufLbl->Data = "2";
Screen.Controls.push_back(BufLbl);
<repeat>
我收到此错误:
error C2903: 'rebind' : symbol is neither a class template nor a function template
我究竟做错了什么?