Home Segments Index Top Previous Next

41: Mainline

When you tell the C++ compiler the type of a variable inside main, you are said to declare the variable. Thus, the following program exhibits three variable declarations—all three variables are declared to be integer variables, because each is preceded by the data-type–declaring int.

main ( ) { 
  int height; 
  int width; 
  int length; 
  ... 
}