У нас вы можете посмотреть бесплатно Passing arrays into functions(array decay to pointer)- prefer std::vector | Modern Cpp Series Ep. 28 или скачать в максимальном доступном качестве, видео которое было загружено на ютуб. Для загрузки выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием видео, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса ClipSaver.ru
►Full C++ Series Playlist: • The C++ Programming Language ►Find full courses on: https://courses.mshah.io/ ►Join as Member to Support the channel: / @mikeshah ►Lesson Description: In this lesson I show you what happens when you pass in an array into a function--the array is decayed (i.e. turned into automatically) a pointer. We lose some information about our array (if it was stack allocated) regarding its size when this happens, and often need to pass in another argument for the size. While we have the option of creating a std::array for more power, I further recommend that we instead use a std::vector that can be dynamically sized, and is overall implemented quite well. As always, in your arguments, consider if you can pass by reference and if it is read only, to make it const! Note, we'll later cover 'span' in the series here: • STL std::span | Modern Cpp Series Ep. 115 Props to the very cool website: https://cppinsights.io/ Link to a full video on pointers from start to finish: • Learn and understand (almost) everything a... ►YouTube Channel: / mikeshah ►Please like and subscribe to help the channel!