so I too, am having issues with a ceasar cipher assignment:
I have to set up a class that holds a string and calls member functions, 1 to print a private data string, 1 to encrypt the use inputted data, and another decrypt it here's some of the set up i have so far(i need to know if I'm in the ball park or need to rework the whole thing):
#include <iostream>
#include <cstdlib>
#include <string>

using namespace std;
* Function Name: main()
* Parameters: None
* Return Value: int
* Purpose: Create user Cipher
class Cipher{
		char key[];
		int key(int a = 0, a = ciphershift);
	int getkey[];
	void encode(string str_en);//function member to encode
	void decode(string str_de); // function memeber to decode
	void ciphershift(int shift);//funtion member to input character shift

void Cipher::encode(string str_en){
	const int Max = 500;
	char str[Max];
	cout<< "Enter message to be endcoded: "<<endl;
	cin.get (str, Max);
	cout<< "You entered: "<< str << endl;
	return 0;

	void Cipher::decode(string str_de){
	cout << "Enter message to be decoded: "<<endl;
	getline (cin, str_de);
	return 0;

void Cipher::ciphershift(int shift)
	cout<< "Enter number character shift (0-20): "<< endl;
	cin>> shift;

Last edited by shabbir; 8May2012 at 13:45.. Reason: Code blocks