I have to write a Morsecode program for my CSE 202 class. I run the compiler and get a huge mess. Looking for some help from the pro's. Any amount will help.
/* Program: morsecode.cpp */
#include <string>
#include <vector>
#include <iostream>
using namespace std;
class Code
{
public:
Code(); // Default constructor - loads and uses morse code
string encode(vector<char> message); // encodes a message consisting of A-Z
string decode(vector<string> message); // decodes a message
private:
vector<string> codewords; // this is a codeword vector parallel to A-Z
vector<char> alpha; // this is the vector for A-Z
vector<char> alphacode(); // function builds the vector alpha - A B C etc.
vector<string> morsecode(); // function builds the vector codewords containing morse code
string encode(char x); //returns the codeword for the character x
char decode(string c); //returns the character for the codeword c.
};