
-----------------------------------
S_Grimm
Wed Nov 02, 2011 12:48 pm

Text Rotation
-----------------------------------
this was a project my teacher assigned to us a while ago. It's already been submitted, but im just looking to see if anyone has any optimization tips or see's anything i could have done better. Thanks in advance :)

/*
 * Shane Grimminck
 * Project 1
 * Version 3.0 : Changed Compiler Warnings to level 4 and fixed possible loss of precision warnings
 * 05/10/2011
 */
#include 
#include 
#include 
#include 
#include 
#include 
#include 
using namespace std;

//static const locale created for the purpose of providing the encode method and the block of code used to check for one letter words to check to see if the word is an alphabetic character
static const locale here ("");

//Function Encode
//Purpose is to encode the character passed in, using the cipher key and the jump table
//accepts a character, the cipher key and the 52 element jump table
char encode (char& ch, int const& cipherKey, vector& jumptable)
{ 
	//if its a character rotate it
	if (isalpha(ch, here))
	{
		if ( ch >= 'a')
			return jumptable

Visual Studio 2010 used.
//Program Purpose is to read a text file and encode or decode it based on the most common one letter word (english language has 4: I, A, a, and O)
//Encoding is done by rotating the alphabetic characters by the offset determined by taking the users input and the most frequent one letter word.
//Originally used with an encoded book, Dracula.
