C++ with Cevelop 16 - Function (a block of code...)
2
0
0
0
0
ShareFavoritePlaylistsFlag
King Tut
King Tut
Published
In this tutorial, I will teach you guys function. Functions are a feature in the code that allows the programmer to store a block of code into. Instead of copying and pasting a block of code over and over again, you can put that block of code into a function.

There are two kinds of functions: A function that returns and a function that does not return. To implement a function without returning a value, you type this:

Void [function name] ()
{ //put in a block of code}

To implement a function that returns a value, you type:

[data type] [function name]()
{
//put in a block of code
return [value based on the function's data type];}

You can type stuff inside the parentheses. This is called a parameter. Most of the time you declare variable(s) inside the parentheses. There is a way to write function as a parameter, but this is advanced and will be mentioned in the future C++ videos. An example of parameter is:

void print(string word)

Hope this helps.

YOUTUBE/BITCHUTE: like and subscribe
VLARE: like and follow
LBRY: follow and download


The IDE and Compiler I use for C++ with Cevelop series:
Cevelop (version may vary) - https://www.cevelop.com/
MSYS2 (version may vary) - https://www.msys2.org/
Getting Started Tutorial - https://www.youtube.com/watch?v=U0ZOG...

Check out my source code for my Github Page:
Github - https://github.com/king-tut-learn


Email - kingtutlearning@gmail.com

#dev #programming #cpp
Expand