//Author: Justin C. Miller 
// SemiColons!!!!!!!!

// Don't forget your semicolons!!!

// they cause the majority (at least in my case)
// of your compilation errors!

// below are examples of when to and when not to 
// use semicolons...


// SEMICOLONS ARE AT THE END OF ALMOST ALL C++ LINES
//		(but of course not all, there are exceptions)

void myFUNCTION(int x) ; // semicolon after all prototypes

int main()		// no semicolon after a function definitions
{				// no semicolon after a opening brackets
	int a ;		// semicolon after all variable declarations
	a = 7 + 8 ; // semicolon after all defintions of a variable

	cout << a << endl ;  // semicolon after all cout lines
	cin >> a ;	// semicolon after all cin lines

	int x = 7 ;
	int y = 9 ;
	if(x == y)	// no semicolon after if
	{
		cout << "HEY YOU!" << endl ;
	}
	else		// no semicolon after else
	{
		cout << "WUZ UP?!?!" << endl ;
	} // no semicolon after a set of if-else statements

	do	// no semicolon after do
	{
		cout << "Miller Time!" << endl ;
		y = y + 1 ;
	}while(y < 12) ;  // semicolon after all do-while statements!!!

	while(x == y)  // no semicolons after while
	{
		cout << "Dude, you rock!" << endl ;
	} // no semicolons after while statements!!!!!

	/* for loops...
	   for(delcaration ; condition ; incrementation)
	   semicolons go after the declaration and condition
	*/
	for(int u = 2 ; u < 12 ; u++)  // no semicolon after for
		cout << u << endl ;

	myFUNCTION(u) ; // semicolons after all function calls!!

	return 0 ; // semicolons after all returns
} // no semicolons after closing brackets of a function

void myFUNCTION(int x)
{
	cout << "x rules! x is " << x << endl ;
}

struct date // no semicolon after struct line
{
	int month ;
	int day ;
	int year; 
};  // semicolon after all structs!!!!!!!!

class cheese{  // no semicolon after class line
private:
	int x ;
public:
	cheese() ;
	void function1() ;
};  // semicolon after all classes!!!!!!