Refactoring with C++ 11

前端 未结 11 2371
夕颜
夕颜 2020-11-28 18:17

Given the new toolset provided by c++ lots of programmers, aiming at code simplification, expressiveness, efficiency, skim through their old code and make tweaks (some point

11条回答
  •  遥遥无期
    2020-11-28 18:36

    For-each syntax:

    std::vector container;
    
    for (auto const & i : container)
      std::cout << i << std::endl;
    

提交回复
热议问题