Teaching / COP 3014 Algorithm and Program Design / Chapter 3: User-defined Functions and Modular DevelopmentLearning materialsChapter 3: User-defined Functions and Modular DevelopmentOn this page User-defined Functions: User-defined Functions Purpose Declaration Definition (implementation) Default value Function call Function Pitfalls Parameter Passing Scope Overloading Function call matching Example Function Glossary Passing Arrays To/From Functions Array Parameters Return an Array Reference-type in Functions Pass by reference Returning a Reference Modular Development: Modular Development TL;DR Overview Advantages C++ Building Process Multi-file Organization in C++ Best Practices in Modular Development Pitfalls in Modular Development Compilation Using g++ Mainstream Compilation Systems Building process of C/C++ projects The g++ command Preprocessor directives Styles of building GNU Make make command makefile Modular Compilation Pitfalls Common Error Messages From make Debug makefile Testing in C++ Motivation Simple Test Run Assertions Testing Frameworks Testability