Sams Teach Yourself C in 21 Days

(singke) #1
Advanced Compiler Use 617

21


Have your error routine search this file and display the appropriate error message
based on a number passed to it.


  1. Some header files might be included more than once when you’re writing a modu-
    lar program. Use preprocessor directives to write the skeleton of a header file that
    compiles only the first time it is encountered during compilation.

  2. Write a program that takes two filenames as command-line parameters. The pro-
    gram should copy the first file into the second file. (See Day 16, “Using Disk
    Files,” if you need help working with files.)

  3. This is the last exercise of the book (not counting the bonus week), and its content
    is up to you. Select a programming task of interest to you that also meets a real
    need you have. For example, you could write programs to catalog your compact
    disc collection, keep track of your checkbook, or calculate financial figures related
    to a planned house purchase. There’s no substitute for tackling a real-world pro-
    gramming problem in order to sharpen your programming skills and help you
    remember all the things you learned in this book.


33 448201x-CH21 8/13/02 11:16 AM Page 617

Free download pdf