Тёмный
No video :(

C++ FUNCTIONS (2020) - What is function parameter/argument (multiple, default) PROGRAMMING TUTORIAL 

CodeBeauty
Подписаться 281 тыс.
Просмотров 100 тыс.
50% 1

In this video of the "C++ functions" course, I'm explaining what are function parameters/arguments, how to pass arguments to a function, and how to invoke a function with parameters.
I'll also cover the topic of multiple function parameters and default parameters.
📚 Learn how to solve problems and build projects with these Free E-Books ⬇️
C++ Lambdas e-book - free download here: bit.ly/freeCpp...
Entire Object-Pascal step-by-step guide - free download here: bit.ly/FreeObj...
🚀📈💻🔥 My Practical Programming Course: www.codebeauty...
Experience the power of practical learning, gain career-ready skills, and start building real applications!
This is a step-by-step course designed to take you from beginner to expert in no time!
💰 Here is a coupon to save 10% on your first payment (CODEBEAUTY_YT10).
Use it quickly, because it will be available for a limited time.
Download Visual Assist here: bit.ly/WT-CB
I use it to enhance the performance, features, and support for C, C#, and C++ development in Visual Studio.
Download Ultra Edit here: bit.ly/UE_CB
It is a powerful, secure text editor designed specifically for programmers.
☕ If you've found my content helpful and would like to support me, you now have the option to buy me a coffee or a cookie! It's a small gesture of gratitude that means a lot to me and helps me keep creating free educational videos for you. You can use the link below to make a contribution: bit.ly/CodeBea...
However, please don't feel obligated to do so. I appreciate every one of you, and I will continue to share valuable content with you regardless of whether you choose to support me in this way. Thank you for being part of the Code Beauty community! ❤️😇
If you are a beginner in C++, check my "C++ for beginners" course:
• C++ FOR BEGINNERS (202...
Follow me on other platforms:
Instagram 📸 - / truecodebeauty
Twitter 🐦- / truecodebeauty

Опубликовано:

 

17 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 134   
@CodeBeauty
@CodeBeauty 3 года назад
📚 Learn how to solve problems and build projects with these Free E-Books ⬇️ C++ Lambdas e-book - free download here: bit.ly/freeCppE-Book Entire Object-Pascal step-by-step guide - free download here: bit.ly/FreeObjectPascalEbook 🚀📈💻🔥 My Practical Programming Course: www.codebeautyacademy.com/ Experience the power of practical learning, gain career-ready skills, and start building real applications! This is a step-by-step course designed to take you from beginner to expert in no time! 💰 Here is a coupon to save 10% on your first payment (CODEBEAUTY_YT10). Use it quickly, because it will be available for a limited time.
@perfectmilk7807
@perfectmilk7807 2 года назад
This 16 minute video helped me understand functions better than my college professor could teach in two weeks. Very, very helpful!
@aminriff_life469
@aminriff_life469 Год назад
Exactly
@andersonsuarez4042
@andersonsuarez4042 Год назад
I’m feeling This rn
@dandon.3667
@dandon.3667 11 месяцев назад
Feeling this
@gamingclipsrsa
@gamingclipsrsa 3 года назад
a whole semester summed up in 16 minutes , finally understand functions . you got a sub from me . keep up the good content
@muradshirinli710
@muradshirinli710 3 года назад
that's really true
@ferny2141
@ferny2141 2 года назад
Sad
@monoman4083
@monoman4083 4 года назад
I will keep learning as long as you keep making such good content.
@AndreaBrandiCreator
@AndreaBrandiCreator 2 года назад
With you I learned more in less time than at lecture. Thanks, I mean it
@anuragvashishtha3841
@anuragvashishtha3841 3 года назад
Power packed Explanation. Makes it so much easier to understand the C++ concepts. Loads of love and respect to your work on RU-vid platform!!
@moeinshamsnosrati
@moeinshamsnosrati 2 года назад
C++ could never be made easier to understand. Thank you Saldina!!!
@blaizemalone4295
@blaizemalone4295 3 года назад
This helped so much. Thank you! Definitely going to watch your other videos too. I’m learning C++ on my own so this has been a tremendous help.
@CodeBeauty
@CodeBeauty 3 года назад
That is awesome! I'm happy to help. ☺️🥰
@Adam-kk7nw
@Adam-kk7nw Год назад
@@CodeBeauty your my hero
@danielhacker8940
@danielhacker8940 4 года назад
Love your videos, please don't stop because you are awesome!!!!!!
@CodeBeauty
@CodeBeauty 4 года назад
Thanks! 😊 As long as there are people who find these videos useful, I feel motivated to make them.
@RobytheFlorentine
@RobytheFlorentine 2 года назад
hi, your lesson was phatastic. I am 48 years old and decided to learn C++ and you made so many things clear. Thansk a lot. Best regards from Florence, ITaly
@muradshirinli710
@muradshirinli710 3 года назад
Greetings from Azerbaijan. This is the best lecture style I've ever seen.
@TrainPlaneBoat
@TrainPlaneBoat Год назад
Fantastic teaching! Thank you very much
@CodeBeauty
@CodeBeauty Год назад
You're very welcome!
@muzammaljutt5135
@muzammaljutt5135 Год назад
hello good afternoon ! your lacture is fully understand and set in my mind 😇😇😇
@user-ck7qo7ru1b
@user-ck7qo7ru1b Год назад
شكرا من القلب تحية من بلاد العرب💖
@uber-jaianada
@uber-jaianada 2 года назад
after all these years I can finally say I understand functions properly, thank you.
@grsrigel2299
@grsrigel2299 3 года назад
If you look at an example, there is one I made for calculating volumes below. #include using namespace std; void CalculateVolumeOf(char shape = 'c', float x=1, float y=1, float z=1) { float volume=0; float pi = 3.1415926; if (x
@instinctmlbb757
@instinctmlbb757 4 месяца назад
Really good job explaining to be fair very helpful, on my 3rd day learning cpp and most of my studies has been written so far so was refreshing to watch a video along side to the information is stuck on the screen to go back and see why it’s doing what etc this gave me more knowledge than reading for 6 hours yesterday about functions to only cover integer functions 😭
@travelwithme824
@travelwithme824 2 года назад
I am complete beginner and I always learn from your videos.🙋‍♂️
@ibrahimg.4469
@ibrahimg.4469 3 года назад
u're an angel teacher, God bless u
@CodeBeauty
@CodeBeauty 3 года назад
🙏💙
@SW-nx4jz
@SW-nx4jz 3 года назад
Omg this was really helpful. You made it very easy and simple to understand. Thank you! Can you do a video on pointers?
@CodeBeauty
@CodeBeauty 3 года назад
I'm working on those videos right now 😊
@mahfuzurparos7304
@mahfuzurparos7304 Год назад
best the way you delver!
@mustafaahmed6110
@mustafaahmed6110 Год назад
a lot of courses does not talk about these information and that was really helpful, thank you.
@isharadeshan3591
@isharadeshan3591 Год назад
Only video.... Only one I learned functions correctly ❤
@tumusiimebrian3745
@tumusiimebrian3745 3 года назад
Another idea mastered... thank you Saldina🙏🙏
@Dan-yd2jq
@Dan-yd2jq 2 года назад
You are so bloody clever. Even more so that English isn't your first language. I wish I had half your talent.
@CodeBeauty
@CodeBeauty 2 года назад
I think I have true love and passion for what I do, and everything else is just hard work and consistency over a long period of time ☺️🤗
@ebrar9409
@ebrar9409 7 месяцев назад
You're so good. Thank you so much dear teacher.🥰🥰
@mr.shredder5430
@mr.shredder5430 11 месяцев назад
my third time watching it and i now understand its purpose, lots of thanks
@shaikhsamee4002
@shaikhsamee4002 3 года назад
I like you teaching I am really appreciate you mam i am from india
@CodeBeauty
@CodeBeauty 3 года назад
🥰🥰
@bhanupratapsingh61
@bhanupratapsingh61 3 года назад
after seeing a lot videos here i reached to the gold. thank u
@imanjallali8258
@imanjallali8258 2 года назад
At first this lecture was quite a headache to learn, but with your clear explanation and diverse examples and a little effort from my side I understand what you explained.
@andregrobler4393
@andregrobler4393 2 года назад
Thanks once more for excellent presentation!!
@pavankalyanindia3652
@pavankalyanindia3652 Год назад
Mam I really love the way of explaining, i can understand easily the content ..😃😃😃
@sethnwughala3664
@sethnwughala3664 4 года назад
Please more videos you are awesome
@CodeBeauty
@CodeBeauty 4 года назад
I just finished filming the next video for this playlist. I have included both an interesting exercise that you can use to develop programmer logic, and another concept related to functions. I'm going to publish it on Monday or Tuesday, depending on how much it is going to take me to edit it! ✌️
@sm-pz8er
@sm-pz8er 9 месяцев назад
Your videos are the best
@sarahabdelaziz179
@sarahabdelaziz179 Год назад
Thanks for your effort.
@Prince......agg1
@Prince......agg1 Год назад
Thank you for the help , getting problem in understanding functions but now they are clear 😍
@ashwanikumar-qj4ei
@ashwanikumar-qj4ei Год назад
you have the awesome quality of teaching thanks for the video...
@mohtdips277
@mohtdips277 3 года назад
I hope your channel will reach one million subscribers !! Because you deserve🙏🙏
@rabarhusen9170
@rabarhusen9170 3 года назад
perfect explaination, well done .
@dileep.b5054
@dileep.b5054 2 года назад
excellent presentation
@RELAXISLANDS
@RELAXISLANDS Год назад
appreciate Your videos thanks so much
@rafiullahafridi11
@rafiullahafridi11 3 года назад
One of my best teacher....
@mazeneid3037
@mazeneid3037 Год назад
Amazing! Thanks a lot
@halbrowjames5795
@halbrowjames5795 2 года назад
Brilliant...i wish i could find this earlier
@tallyschwenkmusic
@tallyschwenkmusic 2 года назад
thank you for these videos, soooo helpful!
@douglascemin2901
@douglascemin2901 Год назад
Great lesson!! congrats for your work...
@yourneedsmet
@yourneedsmet 3 года назад
THANK YOU SO MUCH
@ericokonkwo6260
@ericokonkwo6260 Месяц назад
I cant Thank you enough
@AbhishekVerma-gg4hf
@AbhishekVerma-gg4hf 2 года назад
your explanation is awesome as like you
@paulklasmann1218
@paulklasmann1218 Год назад
Do you have a tutorial to show how to keep functions in separate files? This is something that I need to do. Thanks for these tutorials.
@DeMonx12121
@DeMonx12121 3 года назад
that's what i am looking for... you got a sub Mam....
@getezra1
@getezra1 3 года назад
A wonderful teacher! 🤙
@private9062
@private9062 2 года назад
Thank you!!!!
@yugtandel7311
@yugtandel7311 2 года назад
Love from India 🇮🇳
@sakit4829
@sakit4829 3 года назад
thank you!
@ksanavengsar4050
@ksanavengsar4050 Год назад
thank you thank you thank you than uuuuuuu
@CodeBeauty
@CodeBeauty Год назад
🥰🥰🥰
@snowandl4195
@snowandl4195 2 года назад
Just a tip , you can't use the default parameter , in the Declaration and Definition you must choose one . I found that we can't use them together and searched for the answer in stackoverflow
@teores8312
@teores8312 3 года назад
As always, big++
@sushantpawar5635
@sushantpawar5635 3 года назад
Whoo! Amazing ❤️😘
@zp5775
@zp5775 3 года назад
i love u so much teacher;
@ashrsfsiliman452
@ashrsfsiliman452 3 года назад
Effort deserves thanks
@ahsanjaved7
@ahsanjaved7 Год назад
you are simply beauty with brain 😘
@DailyChasing
@DailyChasing 2 года назад
I really appreciate you!!!
@tijnblub6221
@tijnblub6221 Год назад
Thanks
@lookie236
@lookie236 3 года назад
Thank you for the videos
@ronjackson8829
@ronjackson8829 3 года назад
Can any tell me, how do you pass an argument to the parameter in the function with a space in it? An example of this is a string of "Bob Burns" or "Los Angeles".
@ronjackson8829
@ronjackson8829 3 года назад
I figured it out. Instead of cin >> name;, you have to first #include , and then use getline(cin, name); or getline(cin, city); instead. This will allow you to enter a name with a space in the string, such as "Bob Burns".
@emilianoguillenmedina1066
@emilianoguillenmedina1066 4 года назад
if I want to declare the variable first and then define it, where do I put the "int age = 0? in the declaration, the definiton or in both?
@CodeBeauty
@CodeBeauty 4 года назад
//declaration double sum(double a, double b); //definition double sum(double a, double b) { double result; result = a + b; return result; } The result variable was created inside sum function, and that means that once a sum function finishes its task, it will no longer exist, nor you can access this variable outside of sum function. This type of variable you mention only in the definition. a and b are variables that are called parameters/arguments. You will have to pass these two when you invoke sum function, and that means that they need to be specified in both definition and declaration Definition and declaration of a function need to have the same name, return type, number of parameters, and those parameters have to be of the same data type in both definition and declaration.
@legolas5684
@legolas5684 4 года назад
Odlično!
@vladkirakosyan4987
@vladkirakosyan4987 3 года назад
That's isn't running on Visual Studio 2015,, because after string on line 5, 6, 7 after cout "
@40wattstudio41
@40wattstudio41 Год назад
Up to now I've been in the habit of writing out "std::cout" instead of the shortcut of "using namespace std" . . . but this time when I tried it, I would get error messages saying "identifier "string" is undefined". Strangely enough, if I used "using namespace std" everything works fine, but I have no idea why.
@raiton_gamer
@raiton_gamer 2 года назад
how can i do this assign value to numState variables by calling function
@LightOtt
@LightOtt 3 года назад
Outstanding videos. Very good pace and pedagogy. FYI. I would love to see Mostar city, and especially Koski Mehmed Pasha Mosque. It looks magnificent! Keep up the excellent work!!!
@austinjohnathan4073
@austinjohnathan4073 4 года назад
Do you have a linkedin? I'm looking to build my network with other proficient developers!
@CodeBeauty
@CodeBeauty 4 года назад
I believe that you already found my LinkedIn, and added me as well. 😊 For this reason, I have linked all my social media profiles on my channel's banner. 😊
@radoslaw7166
@radoslaw7166 Год назад
In that case, it should be written as: void introduceMe(const string name);
@teeemm5007
@teeemm5007 3 года назад
do you tutor? You explain so well
@saadalsabagh4862
@saadalsabagh4862 3 года назад
Thank you so much for this great tutorial. I have got question: I can not see window local debugger to run my code in Visual Studio 2019, would you please tell me how I can access it? Thank you, Saldina!
@VoidGameD3v
@VoidGameD3v Год назад
does anyone know how to do it in C# am stuck. I have a method that is been invoked twice and the 1st one doesn't have any value to parameter
@ROYALNIL_SITE
@ROYALNIL_SITE 9 месяцев назад
good🙂
@rabiikanafani2209
@rabiikanafani2209 2 года назад
Omg man I understand functions in 16 min and I didn’t understand it 1 month ago with my professor
@thebalumnguni6708
@thebalumnguni6708 3 года назад
I have a question when you created your other function introdeMe you created variables in the argument and in the main function you created the same variable I was wondering if you could explain that to me.
@eenugaming
@eenugaming 3 года назад
Please make a tutorial on how to make a program that reads data from text file.
@donavanguevara1806
@donavanguevara1806 Год назад
why doesnt string work for me??? im using replit and i type this code exactly how it is in this video... but it doenst work????? i am confused??? is it the website replit?? or am i missing something???
@robderegt534
@robderegt534 2 года назад
when i make an exact kopie void main() is not working must be int main() according to my compiler and now it is working proper.
@yashrawat1232
@yashrawat1232 2 года назад
Same🥲
@happypineapple9547
@happypineapple9547 3 года назад
thanks a lot
@nutbunny10
@nutbunny10 3 года назад
I have been struggling to get this one to work. I can get it to work if I pass the function introduceMe() an int, float, or a char, (and obviously calling introduceMe() inside main() with matching types) but it won't work with a string - I just get no output. I don't understand how to fix it. I have also tried adding #include , but that has no effect. ------------------------------------------------------------------ EDIT: I am working in VSCode using Code Runner, which calls g++ in the terminal. When I work inside Visual Studio it works fine, so it seems it only doesn't work from inside VSCode, but I would still like to know why. EDIT PART 2: I have solved the problem for now, but I am too inexperienced to understand why this solution solves the problem I was having. When using VSCode & Code Runner to call g++ in the terminal to run my code, it calls g++ like so, -----> { g++ FunctionsProject.cpp -o FunctionsProject }, and this doesn't work! but it works by changing the call to this, -----> { g++ FunctionsProject.cpp -o FunctionsProject -static } So adding " -static " at the end of the g++ call makes it work, but the question now is why? ------------------------------------------------------------------- THIS WORKS: #include #include using namespace std; void introduceMe(int name) // or void introduceMe(char name) if I choose the char type { cout
@roros2512
@roros2512 3 года назад
I tried to declare a function and then define it, It had error of "redefining" parameter, below how it actually worked #include void foo(int a, int b=0); int main() { foo(0); } void foo(int a, int b) { std::cout
@dirusgaines2748
@dirusgaines2748 2 года назад
How many functions are there?
@enejsrok8635
@enejsrok8635 Год назад
How did the --if-- work with no { } ???
@40wattstudio41
@40wattstudio41 Год назад
My understanding is if you only have one line to execute under the if statement you can skip the brackets, otherwise you need them.
@aliasjadmaan212
@aliasjadmaan212 3 года назад
asome you made it really easy
@visualbasic-2022
@visualbasic-2022 Год назад
This lady should right a book. But why did she skip over void , what does that mean.
@ahmedhusseinyahia3038
@ahmedhusseinyahia3038 5 месяцев назад
thanks>>;
@al-meezanacademy4722
@al-meezanacademy4722 3 года назад
Looking gorgeous
@cuol5675
@cuol5675 3 года назад
i did a little upgrade there, i added a last name feature this took me so many tries to find the right function to use but its all done now :) didnt even watch the switch video, im so proud #include using namespace std; void introduceMe(string name, string city, string lastName = 0, int age=0) { cout
@cuol5675
@cuol5675 3 года назад
i just noticed that i putted string lastname = 0; it was bc i wanted to do if (lastname != 0) or (lastname == 1) "i tried both" "the code with last name" else "the code without the last name" lol
@onlynoone6512
@onlynoone6512 Год назад
3:37 it didnt worked I tried it. erorr was: C2660 'introduceMe': function does not take 1 arguments
@onlynoone6512
@onlynoone6512 Год назад
could you help about it please
@ahmed17476
@ahmed17476 Год назад
did ya film this twice
@subratadas9772
@subratadas9772 2 года назад
function prototype
@Kevindsatria
@Kevindsatria 2 года назад
what does the parameter (int=1) or (int=0) mean? does anyone know?
@day4834
@day4834 2 года назад
Not much, you probably mean the parameter of the function (int age = 0) which is the default value of the parameter age. Int per se is just a data type.
@Kevindsatria
@Kevindsatria 2 года назад
@@day4834 no, i mean for example: Rational (int =1 , int=0);
@day4834
@day4834 2 года назад
@@Kevindsatria I think this is not possible since int is a data type and should be followed by a variable name like int varName = 1. But I'm a complete newcomer, so maybe someone with more experience can help you.
@luketheslayer1047
@luketheslayer1047 3 года назад
Mostar?
@luketheslayer1047
@luketheslayer1047 3 года назад
Bosna i Hercegovina?
@muhammadomarkhayyamkhan3593
@muhammadomarkhayyamkhan3593 3 года назад
Do you teach Python.
@kprajwal3957
@kprajwal3957 3 года назад
i am from freecodecamp
Далее
31 nooby C++ habits you need to ditch
16:18
Просмотров 764 тыс.
What is a Monad? - Computerphile
21:50
Просмотров 600 тыс.
Compilers, How They Work, And Writing Them From Scratch
23:53
what even is a "reference"?
5:44
Просмотров 127 тыс.