Whats wrong with this?
Please Help me.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
// This Program is for Homework #5, Frederick A. Bowser
// Define named constants; line, item prices, etc.
#include <iostream>
#include <string>
#include <iomanip>
#include <cmath>
#include <cstdlib>
using namespace std;
int main ()
{
int mainOp, subOp;
switch (mainOp)
{
case "1": cout << "3";
break;
case "2": cout << "2";
break;
case "3": cout << "1";
break;
}
return 0;
}
|
The problem is that mainOp hasn't been initialized.
Topic archived. No new replies allowed.