string original = "";
string encrypted = "";
char key = 'x';
getline (cin, original);
cout << "Original data = " << original << endl << endl;
cout << "Encrypted Data = " ;
for (int temp = 0; temp < original.size(); temp++)
{
w = 'A';
x = 'B';
y = 'C';
encrypted += original[temp] ^ (int(key) * temp - int(key) / (temp+1)) % 255;
z = 'Z';
cout << w << x << y << encrypted << z;
}
cout << endl;
Above is the code of my console application, now i want to make a GUI but how can i program it in window form?
I created a richTextbox1 to ask user enter the text, then try to process like above console
application ( encrypted += original[temp] ^ (int(key) * temp - int(key) / (temp+1)) % 255;)
String ^ Data1;
String ^ Data = richTextBox1 -> Text;
for (int i=0 ; i < 10 ; i++)
{
Data1 += Data[i];
}
MessageBox :: Show(Data1);
}
when i run it, i type text in the Box, and click the button then i program as above, it come out a problem said "IndexOutOfRangeExxeption was unhandled"
What is it mean?
Do any1 help me to convert this console code to window form code, i am very new in window form, and no much tutorial, plz help me~
Thx in advance. Hope You all understand my english and also my problem.