Hi everyone
I m openning this theat because I want to see if any of you can help me... well lets see ... I got my full time back at work (after 2 years :o ) and Im worry about college because I do not have enough time to complete my homework,study,work etc... I have to do this homework which is due this tuesday(Im planning to turn it in late "thursday" because we recieve -2 point penalty only :D... as i said I do not have enough time :(.. ) ok ok ok... so the program goes like this.
............................................................................................
This program encodes a message that consists only of letters.."abcdefghijklmnopqrstuvwxyz" and the second table is qwertyuiopasdfghjklzxcvbnm all the words in the message are separated by at least one space from each other.The message may include upper and lower case letters. the output can be entirely in uppercase or in lowecase the messages is encoded by substituting each letter in the message. I also have to store the values in an empty array(I do not know how to so I wont ...)
Im using this "strcpy_s(letter,encoded);" as a way to try to convert values from array 1 to the second.. but it is not working... It is displaying all the values in "encoded" instead of showing only one character per letter... in other words there is no conversion at all ... it is not working :(.
I still have to do some other things to the program such as functions,reverse the order ,etc... I know I can do that but I just got stucked in the first part ....
I hope someone can help meee thank you so MUch!!! :)
#include<string>
#include<iostream>
using namespace std;
int main()
{
char letter[28]={"abcdefghijklmnopqrstuvwxyz\0"};
char encoded[28]={"qwertyuiopasdfghjklzxcvbnm\0"};
cout<<"cryptography engine started"<<endl;
//this is the title of the program.
cout<<endl;
cout<<"Input message=";
cin>>letter;
strcpy_s(letter,encoded);
cout<<letter;
system("pause");
return 0;
}