[Container] 存有pointer的vector使用iterator取內容

使用方式如下

vector<CObj*>::iterator iterEnd = cObj.end();
vector<CObj*>::iterator iter = --iterEnd;

string strData = (*iter)->GetData();

No comments:

Post a Comment

Build docker image from multiple build contexts

Build docker image from multiple build contexts ...