An Overview of C++
I.	Comments
	A.	Multiline comments 		/*    */
	B.	Single line comment 	//

II.	Prior to main()
	A.	Header - #include
		1.   - standard C++ I/O system
		2.	 - standard library of built-in functions
	B.	using namespaces 
		1.	std - Standard C++ library
	C.	Prototypes 
		1.	gives functions return type
		2.	gives number and type of parameters
		3.	return type precedes its name

III.	main() 
	{   
		function 1
		function 2
		return 0;
	}
	A.	all C++ programs consist of one or more functions
		1.  the return type preceds its name in the definition of the function
	B.	must be included in all C++ programs - where execution begins

IV.	Data Types
	A.	int - integers
	B.	float - floating-point data type
	C.	Third supporting detail or information for the sub-topic

V.  	Variables 
	A.		all variables must be declared before they are used
	B.		the type of value that the variables hold must also be specified
	C.		assignment is   =
	D.		multiple variable declared in a comma-separated list

VI.	Input
	A.		cin - console input
	B.		>> input operator	

V.	Output
	A.	cout - console output statement - outputs to screen
	B.	<< output operator before each output
		1.	<< "String" - outputs a string
		2.	<< variable - outputs the value of a variable
	C.		\n - newline or carriage return

VI.		End
		A.		return 0;

VII.		General Syntax and Organization
		A.  statements must end with ; - the statement terminator
		B.	blocks of code - a logically connected group of program statements that is treated as  			a unit
			1.  between opening and closing curly brackets    	{	}
		C.	indenting
			1.	indent one level after each opening brace
			2.	move back out one level after each closing brace
		D.	case-sensitive language so all keywords must be in lower case
		E.	identifiers is a name assigned to a function, variable or any other user-defined item
			1.	cannot use any of the 63 keywords as identifiers
			2.	should not use the name of any standard function
			3.	use names that reflect the meaning and usage of the items being names

Back to the Main Menu