Code:int y=0; char x; cout<<"gimmie character to spam"; cin>>x; while (y==0) { cout<<x<<" "; // IF keypress { // x = pressed key; then continue as normal. } }
GetAsyncKeyState() to check if a key is pressed, and set your char variable accordingly. ?