C++ Code ConsoleApp -> WinForms

01/01/2013 18:53 xyfz#1
Hey,

i want to implement some code from my console app to my win form.

dont know how to write that for loop in win forms though...

pls help, thanks.

in console app:

Code:
        string pw;
	char key;

	cout << "Pw: ";
	cin  >> pw;

	cout << "\nKey: ";
	cin  >> key;

	for (int i = 0; i < pw.size(); i++)
	{
		pw[i] ^= key;	
	}
01/08/2013 03:11 »jD«#2
Assuming this you want to transfer it to a Visual C++ WinForms app, you can put it anywhere inside a function, and then call it from anywhere in your WinForms app, assuming it doesn't run to long or you will have to defer it to another thread.

A bit more code would be nice.

-jD