Elements of a C++ Program


/****************************************************
This is how multi-line comments are written in C++...
Program:	minimal.C
Programmer:	Brian Lawton
Modified:	08/16/2001
****************************************************/

// This is how single line comments are written in C++...
// This is a minimal C++ program

#include <iostream.h> // Pre-processor Directive to include I/O Library

int main() //all programs must have a main function
{	//This is the beginning of the block
	//Note: All executable statements must be terminated by a semicolon
	
	cout << "Congratulations, you have successfully run your first C++ program" << endl;
return 0; //Indicates that the program executed successfully without run-time errors
} //End of block




Back to Previous Page

Document:
Local Date:
Last Modified On: