If you remember I was trying to make a keyboard/mouse trapper for school. Next week I need a prototype but my code isn't working for some reason.

Code:
#include <iostream>
#include <windows.h>

using namespace std;

int main()
{
	unsigned char ks[256];
	int num;
	while(1)
	{
		for(int i=0; i<256; i++)
		{
			num = GetAsyncKeyState(i);
			if(num!=0)
			{
				cout<<i<<" ";
			}
		}
	}
	
	return 0;
}
it should give the ascii value of keys when pressed