 Hello, everybody! Welcome back to C++ Programming. I'm your host, Root of the Knoll. In the last video, we finally created our first function. And what it would do is it would very simply just say hello. And that's all that it took. It was a void function, which means it did not return anything, though we know that we can use any other types. We can use a char type for characters. We can use ints. We can use boolean. And we just have the function name. The parentheses that refer to the fact that it is a function, and the code block, and then what it actually does, blah, blah, blah, blah, blah, in the function itself. So that works just fine for us. But what if we wanted to expand on this? I'm going to go ahead and save a copy of this. I'm going to call mine the file name. It will now be 07 functions with arguments. That's CPP. Let's change this function to say hello. And let's change it to be an int type. And let's change the name to be something simple like add. Let's add an integer. Inside the parentheses are where we can actually supply specific arguments or parameters that a function will take in. When we call this function over in any other function or any other place in the program, when we call it by actually just writing its name and then interacting or invoking the function, we use those two parentheses. And inside we can pass in, that's the term that I'll probably be using the most, we can pass to this function other values and things that it should work with. What if we were to add five and let's say four? Note that I used a comma to separate different arguments and that sort of thing. And we need to actually supply for that in the function itself, in the skeleton. So this int add function, it's going to take two parameters. It's going to take one integer A and it's going to take another integer B. So we have to define int B. That's pretty simple, right? It needs a variable and it's type. This can of course be anything else. It can be a character or a boolean or a float, anything else that you want to do. But in this case, because we're building an add function, let's just keep it to simple integers. Now we can return. You guys know this operator, right? Return A plus B. Simple stuff. If I were to run this code, nothing you can see is really going to happen. Actually, let's go 07, 8 it out. You can see that it doesn't output anything because we haven't told it to output anything. It's just adding these numbers and not doing anything with the information. Let's add C out and let's create a new line here. Now we see out what is returned by this function add five, four. And that's just going to be adding those variables, five and four and line. I can run this. Let's check it out. Now it's adding nine. Cool. This can be anything. You can take in any numbers whatsoever. 20, negative 200. From the code, negative 180. Now, you might be telling me, John, okay, sure. I get your point, but this is stupid. We can just go ahead and say 20 plus negative 200. Well, yeah, you can and you're totally right here. But the point that I'm trying to get across to you guys is that you have functions. And that sounds really stupid when I say you have functions. But what I mean is that you have the capability to do more things than just simply add. This function could do potentially anything. We could have it calm mom. I don't care. We'd have a function that could call mom and that can go through the logistics of, okay, what if we were to look through a yellow book or a book that has all these telephone numbers and addresses and just, okay, where's mom? Who is, what do I have to do? It can do more things than just one. And then you can then, of course, return any data that you need to or you don't have to with your void keyword. Functions can do so much. They are very, very powerful and putting them in the light that, okay, let's add two numbers together is honestly a terrible example. But you know as a programmer, because I'm sure you guys have been through Python. I'm sure you guys have been through batch. You've been through plenty of stuff. You know what a function can do and how to do it. And C++, this is just a syntax. This is the way that you should actually write it in your code. I know you have more ideas as to how these functions can do some incredible things. Okay, I'm good guys. I'm done. Done for now. Thank you for watching this tutorial. Very, very simple. All that it takes for arguments and functions is just adding the variables that you want to use inside of the parentheses in the function, declaration and definition. Thanks. I'll see you in the next tutorial.