Use the auto keyword in C++ STL

后端 未结 6 1692
野趣味
野趣味 2020-12-23 00:10

I have seen code which use vector,

vectors;
s.push_back(11);
s.push_back(22);
s.push_back(33);
s.push_back(55);
for (vector::iterator i         


        
6条回答
  •  独厮守ぢ
    2020-12-23 00:14

    If you want a code that is readable by all programmers (c++, java, and others) use the original old form instead of cryptographic new features

    atp::ta::DataDrawArrayInfo* ddai;
    for(size_t i = 0; i < m_dataDraw->m_dataDrawArrayInfoList.size(); i++) {
        ddai = m_dataDraw->m_dataDrawArrayInfoList[i];
        //...
    }
    

提交回复
热议问题