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;
}

Edited 6 Years Ago by mmgoicochea: n/a

second attempt to finish this assignment//// :/ ....... anddd didnt work.
there is a similar program called "from morse code to english" but the people that made it didnt write the final edit to his program so I cant use it....

............................................................................................
This program encodes a message that consists only of letters (char).."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 message is encoded by substituting each letter in the message.....
I have to use "string manipulation(characters)" sooo

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 got stucked in the first part ....
I hope someone can help meee thank you so MUch!!! :)

[#include<string>
#include<iostream>
#include<cctype>

using namespace std;

void inpput(char*letter,char*encoded,char *name);
int main()
{
	string answer;
	char letter[28]={"abcdefghijklmnopqrstuvwxyz\0"};
	 char encoded[28]={"qwertyuiopasdfghjklzxcvbnm\0"};	
	 char name[101];
	

	inpput(letter,encoded,name);


//exit.
while (true)
{

	cout<<"Do you want to exit the program?[exit/NO]:";
	cin>>answer;
	cout<<endl;
		if(answer=="exit")
			break;
		if (answer=="no")
		{
		
		inpput(letter,encoded,name);
		
		}
break;

}


system("pause");
return 0;
}

void inpput(char* letter,char*encoded,char *name)
{
 

cout<<"cryptography engine started"<<endl;
//this is the title of the program.
cout<<endl;

void strcpy_s(char*letter,char*encoded);
cout<<"Input message=";
cin.get(letter,101);

 cout<<letter;
cout<<endl;
}

Edited 6 Years Ago by mmgoicochea: n/a

This article has been dead for over six months. Start a new discussion instead.