Chapter 8: Enhancing Code Structure and Organization


OVERVIEW

Throughout this book you have, knowingly or not, been using functions in every application that you have developed. The basic Windows form code automatically generates functions every time you build a WinForms application. Your applications have relied on functions to organize and store program code. In this chapter, you learn about how functions work and how to create your own. You learn how to use functions to reduce the complexity of the programs you write and enhance their readability. In the process, this chapter covers how functions work with data and the different ways you can use them to send data to them and get results. In addition, you get an opportunity to use this information in the course of creating this chapter's game project, the Hangman game.

In this chapter, you learn the following:

  • How to organize the programming logic that makes up your applications into functions so that they're easier to develop and maintain

  • How to create custom functions

  • How to pass and return data to and from functions

  • How to streamline your applications by placing reusable code within functions

  • How to develop functions that can process optional data




Microsoft Visual C++ 2005 Express Edition Programming for the Absolute Beginner 2006
Microsoft Visual C++ 2005 Express Edition Programming for the Absolute Beginner 2006
ISBN: 735615381
EAN: N/A
Year: 2005
Pages: 131

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net