Start course
2h 27m

Functions in C++ are reusable named pieces of code that we can call or invoke when we need them to do something. They help us to take large problems and break them down so that they are more manageable. This course explores functions and puts them to use in a range of projects.

Intended Audience

  • Beginner coders, new to C++
  • Developers looking to upskill by adding C++ to their CV
  • College students and anyone studying C++


To get the most out of this course, you should have a basic understanding of the fundamentals of C++.


We have learned a lot in this section about how to break problems down into these reusable named pieces of code called functions. In this section, we've learned the basic syntax of functions, including the return types, identifiers, and parameters, and how to write both the function prototypes, which go before the main function and the function definitions, which go after the main function. We learned about parameter passing schemes in which we control the type of access a function has to its parameters. By passing the parameter by value or by reference, we've also looked at function overloading, in which multiple functions can have the same name, but varied by their parameter lists. We also looked at recursion in which a function can call itself. We had some great projects in this section, including several simple regular projects and a more advanced project in which we implemented a simple game, Tic-Tac-Toe. This project really helped establish our strengths and weaknesses and showed us what a more involved nontrivial project looks like. In the next section, we will begin learning more about Object-Oriented Programming, one of the most popular and impressive features of C++. I'll see you in the next section.

About the Author
Learning Paths

John has a Ph.D. in Computer Science and is a professional software engineer and consultant, as well as a computer science university professor and department chair.

Covered Topics