So, I'm working on making a encrypted in C++, just a basic one. The encrypter needs to have a minimum character limit but it's not working. It's not coming up with any compiler errors, but instead just acting as if the if statement isn't there...
#define _WIN32_WINNT 0x0500
#include <iostream>
#include <windows.h>
#include <string>
#include <fstream>
#define KEYDOWN(vk) GetAsyncKeyState(vk) & 0x8000
#define cls system("cls")
using namespace std;
int main()
{
HWND hWnd = GetConsoleWindow();
string Estring;
ofstream encrypted;
cls;
cout << "\t\t\t\t[F1] - Encrypt" << endl;
while (1) {
Sleep(1);
if (KEYDOWN(VK_F1)) {
cls;
cout << "Enter the string you would like to be encrypted..." << endl << endl;
cout << ":: ";
cin >> Estring;
if (Estring.size() < 8) {
....
}
else {
return main();
}
cin.get();
return 0;
}
What is the problem here?