getch() reagiert zu langsam -.-
-
Allgemein gilt dabei zu beachten, wie im letzten Posting auch getan, das _getch() eine blockierende Funktion ist. Daher ist der erste gepostete Codeschnipsel ziemlich unpraktisch wenn nicht sogar unsinnig.

-
hi
und wieso kann ich mit der mit dem cursor nicht ganz rauf?hier download link zur main.exe:
http://uploaded.to/?id=7got4zbitte um schnelle hilfe
lg
ps hab auf versehen in ansi c thread geschrieben sry
-
???????????????????? KANN MIR BITTE JMD HELPEN?
-
langsam schrieb:
hi
und wieso kann ich mit der mit dem cursor nicht ganz rauf?Wenn du deine Frage nochmal verständlich formulierst und den /Quellcode/ postest versuche ich dir zu helfen
-
darthdespotism schrieb:
langsam schrieb:
hi
und wieso kann ich mit der mit dem cursor nicht ganz rauf?Wenn du deine Frage nochmal verständlich formulierst und den /Quellcode/ postest versuche ich dir zu helfen
char input; const int xch = 10; const int ych = 20; int x = xch; int y = ych; gotoxy(x, y); while(true) { input = _getch(); if(input == 119 || input == 87) //D { gotoxy(x,y - 1); } else if(input == 65 || input == 97) // D { gotoxy(--x, y); } else if(input == 115 || input == 83) // D { gotoxy(x, ++y); } else if(input == 68 || input == 100) // D { gotoxy(++x, y); } else { std::cout << "Taste nicht gefunden."; gotoxy(++x, ++y); } }und wieso kann ich mit der mit dem cursor nicht ganz rauf tun?
danke im vorus!!!
mfg
-
bitte hilfet mir
-
quellcode ist nicht ein teil des quellcodes und auch nicht nur bruchstücke. quellcode ist ganzer quellcode.
in deinem teil steht nur die verschiebung, wenn du hilfe bei den abfragen der maximalwerte willst poste entsprechenden part oder das ganze
-
#include <iostream> #include <windows.h> #include <ctime> #include <string> #include <vector> #include <cmath> #include <conio.h> #include <stdio.h> int main() { char input; const int xch = 10; const int ych = 20; int x = xch; int y = ych; gotoxy(x, y); while(true) { input = _getch(); if(input == 119 || input == 87) //D { gotoxy(x,y - 1); } else if(input == 65 || input == 97) // D { gotoxy(--x, y); } else if(input == 115 || input == 83) // D { gotoxy(x, ++y); } else if(input == 68 || input == 100) // D { gotoxy(++x, y); } else { std::cout << "Taste nicht gefunden."; gotoxy(++x, ++y); } } return 0; }das ist der ganze.
-
#include <iostream> #include <windows.h> #include <ctime> #include <string> #include <vector> #include <cmath> #include <conio.h> #include <stdio.h> int main() { char input; const int xch = 10; const int ych = 20; int x = xch; int y = ych; gotoxy(x, y); while(true) { input = _getch(); if(input == 119 || input == 87) //D { gotoxy(x,--y);// <--------- } else if(input == 65 || input == 97) // D { gotoxy(--x, y); } else if(input == 115 || input == 83) // D { gotoxy(x, ++y); } else if(input == 68 || input == 100) // D { gotoxy(++x, y); } else { std::cout << "Taste nicht gefunden."; gotoxy(++x, ++y); } } return 0; }tut mir leid wenn ich dir jetzt zu nahe trete aber: Stefan Stauß?
-
Ja, wieso?