Why did we declare entry and nums as const auto &
belongs to book: C++ Primer|Stanley B.Lippman, Josee Lajoie, Barbara E.Moo|5th Edition| Chapter number:8| Question number:14
All Answers
total answers (1)
belongs to book: C++ Primer|Stanley B.Lippman, Josee Lajoie, Barbara E.Moo|5th Edition| Chapter number:8| Question number:14
total answers (1)
By using reference, we avoid copy every object in vectors. By using
need an explanation for this answer? contact us directly to get an explanation for this answer`const`
, we avoid accidentally changing the values of elements in vectors.