c++ std::vector 操作


知識點

1 std::vector<std::string> 作為返回參數

void GetConfigState(std::vector<std::string>&vtTemp)

2 對於std::vector<std::string>取值操作

std::vector<std::string>::iterator theIterator;

for( theIterator = vtTemp.begin(); theIterator != vtTemp.end(); theIterator++ )

cout<<theIterator->c_str()<<endl;//這樣取值

3 不能直接進行容器間賦值


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM