C++ Programming Tutorials: 13 Functions - Passing Variables by Value or Reference

  Рет қаралды 109,833

sakitech

sakitech

Күн бұрын

Пікірлер: 85
@gceda8595
@gceda8595 11 ай бұрын
Sending thanks from 10 years later. Your explanation was very helpful and I understand the topic now. Again, thank you!
@williamrubi4326
@williamrubi4326 3 жыл бұрын
Taking my first embedded class and found this video. I wasn't confident with functions being passed by value, therefore I did not understand how to write my hw code. I watched this video right now (1:30am) and not only did I feel much better on the topic but, I also was able to write code and complete my hw understanding everything I did. Truly, thank you. This video was put up 8 years ago and is still saving students. Thank you.
@esdenaze
@esdenaze 9 жыл бұрын
I applaud you for repeating and leaving in the errors. This makes it realistic and less frustrating to learn. Good teacher!
@Ammeeeiizing
@Ammeeeiizing 2 жыл бұрын
I like the fact that you go through all misstakes too! Makes it easier to follow the whole process. Thank you !
@christinasarah2766
@christinasarah2766 10 жыл бұрын
GOD bless you. This tutorial is authentic and straight to the point. Keep up the good work!!!
@sakitech
@sakitech 11 жыл бұрын
Because you are shipping variables outside of the main function. When they come back to main, I want the modified versions to come back. Then I can resend them out with updated values. You need ampersand sign anytime you want to modify the ACTUAL variable.
@AYHA0
@AYHA0 9 жыл бұрын
thank u from the bottom of my heart u made what i coudnt understand it in 4 month in 20 min easily
@Dani98664
@Dani98664 7 жыл бұрын
Spent an hour trying to get this information. So glad I found this video!
@tobiasrodrigues1
@tobiasrodrigues1 8 жыл бұрын
Thank you so much. I watched other videos where I got all the basics and still didn't get it. I finally understand and you made it so simple. You really helped me a lot.
@Raulz713
@Raulz713 8 жыл бұрын
Thanks very well explained. Just finished my Programming Fundamentals class and these videos are great as a refresher.
@Eeeppy
@Eeeppy 7 жыл бұрын
Thank you so much for this tutorial....You don't jump around topics and you present the material very thoroughly. I appreciate it. =)
@ernestogarcia8351
@ernestogarcia8351 5 жыл бұрын
nice video!!! 9:50 - end was extremely helpful , I am now ready for my quiz!!!
@techiquirl
@techiquirl 7 жыл бұрын
This is the best tutorial I've seen for udf variable ever! Thank you!
@asemnafiz
@asemnafiz 10 жыл бұрын
Best explanation ever! Been confused with this thing since yesterday....been going through notes, textbooks and other youtube videos and finally I got it. Thank you!
@mydearpcy
@mydearpcy 8 жыл бұрын
thankyou mister. You are very good at explaining and make me more understand about this topics. Much of helps!
@plastic27life
@plastic27life 9 жыл бұрын
clear and to the point. you've been a blessing
@Rizwaannminhas
@Rizwaannminhas 8 жыл бұрын
Thankyew brother. i understand this topic frm only one video of yours. Thanku again !
@shahuzinlafeer533
@shahuzinlafeer533 10 жыл бұрын
Thank You very much. i was struggling with this concept and thanks to your video everything is now cleared. well done!!
@tykechingching
@tykechingching 10 жыл бұрын
Thanks for this video Sakitech. I was struggling to find material to help me with this topic, but you did it so clearly!
@_DarkKnight2301_
@_DarkKnight2301_ 5 жыл бұрын
Amazing video. Was trying to find something like this for a few hours because I just wasn't figuring out how to do it. Currently in an intro course and I'm jumping ahead and trying to make a slightly complicated math practice program using the basic arithmetic operations. This is hopefully the final key I need to really build the design I want. Though I do need to figure out how to stop the program from breaking when a char is entered instead of an int. lol
@aydinahmadli7005
@aydinahmadli7005 5 жыл бұрын
greatly explained, and informative video, thank you!
@kzukijn
@kzukijn 7 жыл бұрын
Hi Sakitech... thank you for this tutorial. I cannot finished my Homework done by time if i haven't seen this tutorial for functions. Been stuck for 2 days working out on it. The book is so flat that I couldn't understand it. Thank you! Keep it up!
@brettnieman3453
@brettnieman3453 7 жыл бұрын
Way better explanations than my actual C++ class!
@arifhakiminadnan4880
@arifhakiminadnan4880 7 жыл бұрын
a very clear explanation , u deserve to be a lecturer
@winterslee
@winterslee 9 жыл бұрын
Thanks sakitech , it helps me a lot
@WinningBURRIT0
@WinningBURRIT0 9 жыл бұрын
This video saved my life. Thanks man.
@brandonfarr5638
@brandonfarr5638 10 жыл бұрын
Thank you so much! That was a really great analogy comparing the reference parameter of a function to shipping an object, in order to get it modified.
@gmartshopper
@gmartshopper 9 жыл бұрын
Wow, this tutorial was SUPER helpful!!! I was having trouble figuring out the difference between passing variables by value vs. reference. Thanks!
@KittyKode
@KittyKode 7 жыл бұрын
crystal clear explanation ,tnx man
@danyalfayazi8804
@danyalfayazi8804 6 жыл бұрын
thank you so much. god bless you you have no idea how much you thought me.
@oliffx1
@oliffx1 9 жыл бұрын
Good stuff, you explained much more clearly than my lecturer!
@amaliavina4029
@amaliavina4029 7 жыл бұрын
Excellent tutorial!!! Thanks,
@bryankim7966
@bryankim7966 7 жыл бұрын
outstanding tutorial. I was screaming the whole time when you mispelled "calculate" though
@venzeti
@venzeti 4 жыл бұрын
Honestly, thank you so much!!
@Esther010
@Esther010 4 жыл бұрын
Thank u very much, I appreciate it
@NicoEstebanR
@NicoEstebanR 9 жыл бұрын
Thank you so much this helps a lot
@Stangil1
@Stangil1 8 жыл бұрын
Very good video.
@adibaiman570
@adibaiman570 3 жыл бұрын
thankyou so much sirrr !!
@npn7564
@npn7564 6 жыл бұрын
very great tutorial.
@Kevin0594
@Kevin0594 8 жыл бұрын
You.. sir.. are a LIFESAVER, THANK YOU
@mamuchjero9199
@mamuchjero9199 5 жыл бұрын
Construct a function named pass() that accepts a double precision arguments - the mean tolerance of a group of parts and returns a reject or accept code depending on whether the mean tolerance is less than or greater than 1.0%. If the mean tolerance is less than 1.0%, the function should return an A to accept ;otherwise, it should return R to reject. how can i solve this ?
@sakitech
@sakitech 11 жыл бұрын
Coming soon, sooner than a week.
@bhaskarchary6683
@bhaskarchary6683 9 жыл бұрын
will you please show me the debugging procedure to find bugs in c++ with embercadero tool
@sirpj6955
@sirpj6955 8 жыл бұрын
Great video! Thank you
@gerardomarchetti6634
@gerardomarchetti6634 7 жыл бұрын
Thakns man!!! you save me !!! :D
@Basedeath
@Basedeath 7 жыл бұрын
What if I want a function to add to a variable in the main instead of switching values with it?
@andriyblyznyuk5590
@andriyblyznyuk5590 8 жыл бұрын
Hi. I have a question. So if you would not pass value by reference, then int number1and number2 would remain 0?
@sardorbekmuhtorov7018
@sardorbekmuhtorov7018 7 жыл бұрын
yeah i think so , idk how it is working
@BEESkneesz
@BEESkneesz 11 жыл бұрын
Have you done arrays?
@lemmeleeds5291
@lemmeleeds5291 6 жыл бұрын
Thank you so much .. it helped me a lot... (love from pakistan)
@gjohnson1194
@gjohnson1194 9 жыл бұрын
great video
@informativecontent4778
@informativecontent4778 6 жыл бұрын
Thanks man
@Matice21
@Matice21 2 жыл бұрын
Why can't the function definition and prototype be above the main(); function?
@ap-lq1cq
@ap-lq1cq 4 жыл бұрын
Whats the use of prototype?
@BumsInChocolate
@BumsInChocolate 6 жыл бұрын
This guy is a legend
@NicksLocker
@NicksLocker 8 жыл бұрын
Thanks!
@abdiwahabadan1817
@abdiwahabadan1817 4 жыл бұрын
very simple easy to understand, thank you i wish you best of guidance from Allah and best of guidance is Islam.
@yuesun3935
@yuesun3935 4 жыл бұрын
thank you sir
@RimSelektaMusic
@RimSelektaMusic 9 жыл бұрын
Thank you
@mamunbinrashid4635
@mamunbinrashid4635 7 жыл бұрын
#include using namespace std; void input(int ,int ); void calculate(int , int , int ); void print(int ); int one,two; int total; int main() { //int one,two; //int total; input(one, two); calculate(one, two, total); print(total); } void input(int , int ) { cout one; cout two; } void calculate(int , int , int ) { total = one +two; } void print(int ) { cout
@BURU1994
@BURU1994 8 жыл бұрын
can you make a function that takes two inputs arguments and provides two separate results to the caller, one that is the result of multiplying the two arguments, the other the result of additing them.
@c0ntender1
@c0ntender1 9 жыл бұрын
why am i getting a total of 0 zero on display
@ShaunJW1
@ShaunJW1 9 жыл бұрын
Thank fuck someone could explain this to me, when im a billionaire ill send you a Ferrari good sir!
@samjones8573
@samjones8573 7 жыл бұрын
Sir I want to learn C++ functions
@amirulyusoff4338
@amirulyusoff4338 4 жыл бұрын
is there any way to use instead of using "&" ? anyone who know feel free to comment. I have to do my assignment. Thank you in advance.
@festuskemboi4257
@festuskemboi4257 7 жыл бұрын
it was awesome
@thenoobsterman
@thenoobsterman 9 жыл бұрын
proooo-toeeeee-typeeeee lol good tutorial though. In the last part is it even necessary to pass total to print_Results as reference? You dont modify it in any way you just print it.
@BDC2K
@BDC2K 6 жыл бұрын
Only put the data type(s) in a prototype's parameters! Example: void print(int x); // Wrong void print(int); // Correct
@BDC2K
@BDC2K 6 жыл бұрын
There were so many errors in the video, that I realized that I don't want to comment every single error, it's too much work...
@rowel9785
@rowel9785 7 жыл бұрын
I don't know where ampersand is in my keyboard :(
@shariqkhan4627
@shariqkhan4627 7 жыл бұрын
so sad
@kenshinhimura8708
@kenshinhimura8708 6 жыл бұрын
9:30 “Don’t try to learn this while you’re taking C++...” Too bad they force you to try and learn it at that point 🙃
@dalalalghomlas1600
@dalalalghomlas1600 10 жыл бұрын
could you talk about reference in more advance way ! i need to know the root of this please!
@LK-pc4sq
@LK-pc4sq 9 жыл бұрын
I think he is good, repeats so we can absorb it. Btw, text after (int x) is grey and very hard to read. I cannot see it. It is a //comment. Could be my laptop screen it is a anti glare screen so not sure.
@user-pb8qi2yy7f
@user-pb8qi2yy7f 9 жыл бұрын
videos are good but plz increase clarity
@raginibhayana1117
@raginibhayana1117 7 жыл бұрын
why do we need a prototype?
@chikipichi5280
@chikipichi5280 3 жыл бұрын
Damn I could tell this was explained very clearly and I still don't get shit
@thatcosmokramer
@thatcosmokramer 6 жыл бұрын
>sees that he types endl; instead of NO
@HardNougat
@HardNougat 7 жыл бұрын
Thank you! It never occurred to me that a function doesn't actually change the value of a variable in main...that is unless you use pass by name.
@sakitech
@sakitech 7 жыл бұрын
HardNougat Glad I could help!
@plastic27life
@plastic27life 9 жыл бұрын
Very Helpful -struggling Comp Sci Major
@Jaime-II
@Jaime-II 5 жыл бұрын
how you doing now?
@mobarakjama5570
@mobarakjama5570 6 жыл бұрын
Who else is confused.
@anonymoususer7663
@anonymoususer7663 4 жыл бұрын
You're using global variables!! 😡🤬
Reference Variables | C++ Tutorial
12:04
Portfolio Courses
Рет қаралды 5 М.
黑天使被操控了#short #angel #clown
00:40
Super Beauty team
Рет қаралды 61 МЛН
How Strong Is Tape?
00:24
Stokes Twins
Рет қаралды 96 МЛН
Гениальное изобретение из обычного стаканчика!
00:31
Лютая физика | Олимпиадная физика
Рет қаралды 4,8 МЛН
C++ Examples - Pass by Value vs Reference vs Pointer
11:53
Caleb Curry
Рет қаралды 24 М.
Passing structures to functions -- C++ Structs Tutorial #6
12:46
Professor Hank Stalica
Рет қаралды 3,7 М.
C++ user defined functions (#15) 📬
17:14
Bro Code
Рет қаралды 39 М.
Buckys C++ Programming Tutorials - 35 - Passing Arrays to Functions
7:59
C++ Tutorial 13 - Passing by Value vs Passing by Reference
15:01
programminghelporg
Рет қаралды 121 М.
Pass By Reference | C++ Tutorial
10:21
Portfolio Courses
Рет қаралды 11 М.
Functions in C++
9:50
The Cherno
Рет қаралды 521 М.
what even is a "reference"?
5:44
Low Level
Рет қаралды 144 М.
C++ Programming: Passing Arrays to Functions
10:36
ReelLearning
Рет қаралды 195 М.
黑天使被操控了#short #angel #clown
00:40
Super Beauty team
Рет қаралды 61 МЛН