//Course: 4002-208
//Author : Jared Stroud
//Date : 10/30/12
//Project: 5
// Purpose: analyze average monthly temperature data for Rochester from 1940 to 2011.
#include <iostream>
#include <iomanip>
#include <fstream>
#include <string>
#include <stdio.h>
#include <stdlib.h>
#include "functions.h"
#include <fstream>
usingnamespace std;
// function prototypes
int mainMenu(string prompt);
int main ()
{
// variable declarations :
int option;
int menuoption;
ifstream in_stream; //create a file object
in_stream.open("RocTempDataV1.txt");
//check if file has been opened
if( ! in_stream.is_open( ) )
{ //file opened
cout << "Unable to open file - does not exit in current directory" << endl;
exit(0);
}
mainMenu(menuoption);
// switch statement for menu options.
switch (menuoption)
{
// choice for menuoption 1
case 1:
if (menuoption == 1)
{
cout << "option1" << endl;
}
break;
// choice for option 2
case 2:
if (menuoption == 2)
{
}
break;
case 3:
// choice for option 3
if (menuoption == 3)
{
}
break;
default:
cout << " Error Invalid number this is the switch default";
}
// error checking for valid input
if (option <=0 || option >=4)
{
while (option <= 0|| option >=4)
{
cout << "Error invalid input\n" << endl;
cout << "Please enter another option : " << endl;
cin >> option;
}
}
}
mainMenu(menuoption);
// switch statement for menu options.
switch (menuoption)
{
// choice for menuoption 1
case 1:
// if (menuoption == 1) don't need this
// {
// cout << "option1" << endl;
// }
break;
// choice for option 2
case 2: // thats what this does
// if (menuoption == 2)
// {
// }
break;
case 3:
// choice for option 3
// if (menuoption == 3)
// {
// }
break;
default:
cout << " Error Invalid number this is the switch default";
}