C++ Tutorial [20] - Reference Variables

preview_player
Показать описание
In this episode, I show you how to use reference variables with functions in C++. Along with that, I demonstrate how arrays are used in functions as parameters and how they serve as reference variables as well. Reference variables are parameters which can be passed by reference meaning it's connected to the variable passed into the function when called and will be edited when the variable is edited in the function. #CPP #CPlusPlus

Code: Coming Soon

More Videos coming soon.
Leave a comment for any future video suggestions.
Рекомендации по теме
Комментарии
Автор

can you please make the letters bigger?

ItsSunnyMonster
Автор

14:56, I don't think there's a method that returns the size of the array but you actually can know how many elements are in it by knowing the size of the arr and the type of the elements it stores and it is coded like this:

sizeof(arr)/sizeof(arr[0])

Example:

int arr[2] = { 1, 2 };
sizeof(arr)/sizeof(arr[0]) // sizeof(arr) is 8 because has 2 ints and each int has a size of 4, sizeof(arr[0]) is 4 because it is of type int

8/4 = 2 and there we have our answer. Great video Kody

cilantrin
Автор

best song choice my mans, great video

KarMadz
Автор

also i can't hear you as clear as before

ItsSunnyMonster
Автор

The image quality on this video is a bit blurry. I can't read the scripts you type.

ionlyemergeafterdark
Автор

Thank you very much :), It was useful

Gryffon
Автор

i feel like im going from step 1 too 500 with these functions they are so confusing

flavorymeme
Автор

You can use the size(arr) method to get the number of elements in the array. But this doesn't work if you're referring to an array that doesn't have the number of elements defined beforehand such as "int num[5];". This comment is probably too late anyway, you've probably learned this method by this point

aaronperies
Автор

dude zoom a bit. script is too small to read comfortably even after i zoomed my window 150%

markaragnos
join shbcf.ru