Question: Must be programmed in C++: http://pastebin.com/4HGxL6J8 My code so far is linked above ^ Currently trying to get encode and decode functions to work properly

Must be programmed in C++:

http://pastebin.com/4HGxL6J8

My code so far is linked above ^

Currently trying to get encode and decode functions to work properly as the rest if the functions work. Here is the requirements for the two:

string encode (string message, string key)

converts message using lower_and_strip o key is not changed, but is used as is!

for every character in the message o call return_encoded_char with that character

o concatenates the number into a space separated string

returns the encoded message

string decode (string encoded_text, string key)

for every character in encoded_text

o call return_decoded_char with that character

o concatenates the number into a string

returns the encoded message

Sample case for the encode function:

3 abcdefghijklmnopqrstuvwxyz help me 

Excepted output:

7 23 7 4 23 18 

Sample case for decode function:

5 abcdefghijklmnopqrstuvwxyz 7 23 7 4 23 18 

Excepted output:

helpme 

Thank you for the help in advance!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!