반응형 Compiler2 getch() for Linux 구글 신이 있어서 다행이지,, 휴... 모방한번 모방? 모방인가- 한번하는거 힘드네;;; 출처는 http://cboard.cprogramming.com/faq-board/27714-faq-there-getch-conio-equivalent-linux-unix.html #include #include #include int mygetch( ) { struct termios oldt, newt; int ch; tcgetattr( STDIN_FILENO, &oldt ); newt = oldt; newt.c_lflag &= ~( ICANON | ECHO ); tcsetattr( STDIN_FILENO, TCSANOW, &newt ); ch = getchar(); tcsetattr( STDIN_FILENO, TC.. 2009. 7. 3. gcc , clrscr gotoxy #include #include void clrscr(void) { int i; for (i = 0; i < 100; i++) // A bunch of new lines for now. It's blank, hey! putchar('\n');} int gotoxy(int x, int y) { char essq[100]; // String variable to hold the escape sequence char xstr[100]; // Strings to hold the x and y coordinates char ystr[100]; // Escape sequences must be built with characters /* ** Convert the screen coordinates to string.. 2009. 7. 2. 이전 1 다음 반응형