Category : input

I have two consecutive inputs, however, my program ends before allowing me to have my second input and just runs till the end, so: #include <iostream> #include <vector> using namespace std; int main() { vector<double>v1; for(double temp1; cin >> temp1;) v1.push_back(temp1); cout << "input1"; vector<double>v2; for (double temp2; cin >> temp2;) v2.push_back(temp2); cout << "input2"; ..

Read more

GetRawInputData() returns -1 (error) and GetLastError() returns 87 which is "The parameter is incorrect.", the first call to the function to get the data size succeeds but the second one, where I try to actually get the data, fails. UINT DataSize; if (GetRawInputData((HRAWINPUT)Message.lParam, RID_INPUT, NULL, &DataSize, sizeof(RAWINPUTHEADER)) == -1) { Error("Failed getting raw input amaountn"); ..

Read more

I can nowhere find a simple (!), no tweaking, as much as possible standard C / C++ implementation in Windows Visual Studio of the old getkey() function that does not wait, but immediately responses with either the read character or a NILL/EOF code. Something like this [working under conio]: ` if (_kbhit()) { ch = ..

Read more

Line 38 and 43 I don’t see the purpose of the second parameter in the deposit() and withdrawal() functions inside the main but I need it there to run those functions. Is there a better way to do this? Any suggestion is appreciated. int deposit(int cBalance, int dBalance) { cout << "How much would you ..

Read more

So I noticed that when getting input with "SDL_GetKeyboardState(NULL)", when holding a specific button, it is going to first write out lets say "a", and after 1 second its gonna continue "aaaaaaaa" normally. I want to when I hold button a that it automatically goes "aaaaaa". Here is a video if you dont understand my ..

Read more