Рассмотрим следующий фрагмент:
Код: Выделить всё
int main(){
std::vector a;
std::vector b;
std::vector c;
// std::vector d;
// std::vector e;
// std::vector f;
// std::vector g;
// number of vectors can scale to 20+
auto pointers_to_write = {&a, &b, &c};
for(int i=0; i
Подробнее здесь: [url]https://stackoverflow.com/questions/79842906/how-can-i-improve-my-code-to-reduce-repetitions[/url]
Мобильная версия