leettranslator.cpp

// Programmer: Price date: 4/11/13

// File: leettranslator.cpp class: cs53

// Purpose: this file contains the main function for the program that

// ttranslates english to leet and vice versa.

#include "leet.h"

#include <iostream>

using namespace std;

int main()

{

/* ------------------- DECLARATIONS ---------------- */

char leet[MAX_LEET_INPUT]; //input array for leet

char english[MAX_ENGLISH_TRANSLATION];//output array for english (4 times leet)

bool quit = false;

greet();

do

{

switch (menu())

{

case '1':

translate(); //inputs char by char and translates

break;

case '2':

get_leet(leet); //inputs limited string of chars

translate(leet,english);//pass leet, returns english

cout<<english<<endl;

break;

case '3':

quit = true;

break;

default:

cout<<"ERROR: invalid input. try again....."<<endl;

}

} while (!quit);

signoff();

return 0;

}