What is wrong with my switch statement? It seems like that's how I've done it other times. But I get a warning that says, "switch contains no 'case' or 'default' labels and I get an error that says, "illegal case". What the hell? Note: I had more code in case 1 but I cut it to see if it was something within that particular code but I still got nothing...

#include <iostream>
using namespace std;

int main()
	int choice;
	int option;
	int id;
	int type;
	float salary;	
	float rate;
	float hours;
	float increase;
	float totalGrossPay = 0;
	float totalFedTax = 0;
	float totalStateTax = 0;
	float totalSS_Withholding = 0;
	float totalWithholding = 0;
	float totalNetPay = 0;

		//This is the main menu.
		cout << "   Main Payroll Menu\n\n";
		cout << "1. Add Employee\n";
		cout << "2. Update Employee\n";
		cout << "3. Apply Pay Increase\n";
		cout << "4. Output Payroll\n";
		cout << "5. Exit the Program\n\n";
		cout << "Please choose one.\n\n";
		cin >> choice;
		cout << "\n";

			switch (choice);
				case 1: cout << "LOL";

	} while (choice != 5);
return 0;
7 Years
Discussion Span
Last Post by adam1122
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.