/* Lecture Code 3.0
 *
 * Misuse of macros.
 */
#include <iostream>
using namespace std;

/* How many hours per week I spend doing various things. */
#define MOWING_LAWNS 4
#define BEING_A_NINJA 2

/* WARNING: This is wrong!  The operator precedence is incorrect.
 * To fix this, just use the const keyword.  Otherwise, if you
 * absolutely must use #define, surround this in parentheses.
 * See Handout #05
 */
#define TOTAL_HOURS MOWING_LAWNS + BEING_A_NINJA

#define HOURLY_WAGE 4.5

int main()
{
	/* This is wrong!  See how the macro expands! */
	cout << (HOURLY_WAGE * TOTAL_HOURS) << endl;
	return 0;
}

