My Program:
Code:
/*
*** COMPILING WITH DEV C++ 4.9.9.2 ***
*/
#include <windows.h>
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
using namespace std;
int main(int argc, char *argv[])
{
if (GetAsyncKeyState(VK_LSHIFT)&1) {
do {
int a;
string array [42] = {"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","0","1","2","3","4","5","6","7","8","9", " ", " ","?","!","#","*" };
{
Sleep(45);
for(int i=0; i<27; i++)
{
a = rand()%42;
cout << "\n " << array[a];
cout << " ";
}
cout << endl;
}
getch();
return 0;
}
else (GetAsyncKeyState(VK_RSHIFT)&1)
{
do {
int b;
string array [1] = {"WRONG CHOICE..."};
{
Sleep(45);
for(int i=0; i<27; i++)
{
b = rand()%1;
cout << "\n " << array[b];
cout << " ";
}
cout << endl;
}
getch();
return 0;
}
}
}
}
I'm using Dev-C++ and am constantly getting errors, I'm not sure why though..
The purpose of this program is if int a is called, it shows the random integers, and it will look like the matrix (that's when the LShift is pressed) and when the RShift is pressed, it's supposed to show the else choice.
Thanks to all who can help me
-Money001