leet.h
#ifndef LEET_h
#define LEET_h
// Programmer: Price date: 4/11/13
// File: leet.h class: cs53
// Purpose: this file contains the constants, protos, etc for the leet translation
// program.
using namespace std;
// this const represents the max size string to input for translation leet->eng
const short MAX_LEET_INPUT = 500;
// this const represents the max size of the string translated to english.
const short MAX_ENGLISH_TRANSLATION = 1000;
// the following is a dictionary of leet chars for english
const short MAX_LEET_SIZE = 5;
const char LEET_A[MAX_LEET_SIZE] = "@";
const char LEET_B[MAX_LEET_SIZE] = "8";
const char LEET_C[MAX_LEET_SIZE] = "(";
const char LEET_D[MAX_LEET_SIZE] = "[)";
const char LEET_E[MAX_LEET_SIZE] = "3";
const char LEET_F[MAX_LEET_SIZE] = "|=";
const char LEET_G[MAX_LEET_SIZE] = "9";
const char LEET_H[MAX_LEET_SIZE] = "#";
const char LEET_I[MAX_LEET_SIZE] = "][";
const char LEET_J[MAX_LEET_SIZE] = "]";
const char LEET_K[MAX_LEET_SIZE] = "|<";
const char LEET_L[MAX_LEET_SIZE] = "1";
const char LEET_M[MAX_LEET_SIZE] = "|\\/|";
const char LEET_N[MAX_LEET_SIZE] = "|\\|";
const char LEET_O[MAX_LEET_SIZE] = "0";
const char LEET_P[MAX_LEET_SIZE] = "|?";
const char LEET_Q[MAX_LEET_SIZE] = "4";
const char LEET_R[MAX_LEET_SIZE] = "|^";
const char LEET_S[MAX_LEET_SIZE] = "$";
const char LEET_T[MAX_LEET_SIZE] = "7";
const char LEET_U[MAX_LEET_SIZE] = "|_|";
const char LEET_V[MAX_LEET_SIZE] = "\\/";
const char LEET_W[MAX_LEET_SIZE] = "\\^/";
const char LEET_X[MAX_LEET_SIZE] = "><";
const char LEET_Y[MAX_LEET_SIZE] = "'/";
const char LEET_Z[MAX_LEET_SIZE] = "%";
// the greet() function will output a greetings message to the user.
// Pre: none
// Post: message output to user
void greet();
// the signoff() function will output a exiting message to the user.
// Pre: none.
// Post: exiting messge output to the user.
void signoff();
// the menu() function will present a menu of options to the user and return a char
// Pre: none.
// Post: menu of options presented to user; char returned
char menu();
// this translate() function will translate english to leet according to
// the dictionary above; input occurs in this function.
// Pre: none.
// Post: outputs the screen a translation to leet any input read in in this
// function.
void translate();
// this translate() function will translate the leet in first array parameter
// to english in the second.
// Pre: leet[] must be null-terminated.
void translate(const char leet[],char english[]);
// the get_leet() function will prompt for and read in a string of characters
// that is interpretted as leet.
// Pre: none.
// Post: the array parameter will be a null-term'd char array.
void get_leet(char leet[]);
// the copy() function copies array[start] to array[start+num] into letter.
// Pre: start and num must be nonneg and start+num<MAX_LEET_SIZE
// Post: letter is ntca with part of array as data.
void copy(char letter[],const char array[],const short start,const short num);
#endif