I'm having trouble with something that my professor assigned. He's out of town at the moment and hasn't answered any of my emails and the text book doesn't explain how to do this very well. It is an encryption/decryption program. The output should be like this: Original string is: this is a secret! Encrypted string is: uijt!jt!b!tfdsfu" Decrypted string is: this is a secret! Basically this program turns a character into the next letter of the alphabet. For example t becomes u, h becomes i,spaces become exclamation points, etc. The objective of this lab is to use pointer notation to make the program do this but I don't understand pointers too well. If someone could get me started on this program I'd appreciate it. Here's the template. Where you see /* that's where I have to write lines of code. The part that I'm totally cluless on is the implementation of the functions 'encrypt' and 'decrypt'. Thanks. #include using std::cout; using std::endl; /* Write the prototype for function encrypt */ /* Write the prototype for function decrypt */ int main() { // create a string to encrypt char string[] = "this is a secret!"; cout << "Original string is: " << string << endl; encrypt( string ); cout << "Encrypted string is: " << string << endl; decrypt( string ); cout << "Decrypted string is: " << string << endl; return 0; } // end main // encrypt data void encrypt( char e[] ) { /* Write implementation for function encrypt */ } // end function encrypt // decrypt data void decrypt( char *ePtr ) { /* Write implementation for function decrypt */ } // end function decrypt
Q
Quaydogg
@Quaydogg