The first line lets the programmer use extra functions

The first line lets the programmer use extra functions -...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
The first line lets the programmer use extra functions, such as cout. You must #include header files (or ".h" files) like these at the start of your program in order to use the functions/variables/classes that they define. The syntax is: #include <header_file_name> (Note that some header file names end in .h and others don't). You can also easily create your own header files for use in your programs if you want to be able to reuse your code or want to better organize your programs. Above the #include line is a comment. C++ will completely ignore anything you write after two forward slashes ( // ) until the end of the line. Another way to comment, which you can find a few lines later, is the standard C comment syntax. Simply type any message you want between the start-comment marker (a forward slash followed by and asterisk, /* ) and the end-comment marker (the opposite, */ ). The message can span many lines as needed, as shown in the typical commenting style below: /* * The C++ compiler can not see ANYthing I type here
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/12/2011 for the course CIS 101 taught by Professor Keefe during the Spring '08 term at Texas State.

Ask a homework question - tutors are online